The pain what you are experiencing may be due to the erupting wisdom tooth. This is a very common issue these days where the wisdom tooth tries to erupt but due to inappropriate orientation it will causing pain first followed by gum swelling later infection and swelling.
Next Steps
Do get a x ray first to confirm it and then plan for the extraction if that is the exact cause befor it causes damage to other teeth as well.
Health Tips
Avoid giving heat application to the affected site in any manner and try to avoid sleeping from the same side because it will create postural pressure and leads to throbbing pain.