Thanks for asking the query,
Pain can be due to the tooth in which filling is displaced or errupting wisdom tooth to rule out this you need to take x-ray of the region.
Wisdom tooth is often impacted in the jaw bone and leads to food deposition and bacterial accumulation leading to redness
, inflammation and swelling of the overlying gums known as PERICORONITIS
Best treatment for this is extraction of wisdom tooth.
Get the root canal treatment
of the infected tooth.
Take complete course of antibiotics and analgesics.
Hope this helps out.