It maybe due to an infection in the gums or due to developing wisdom tooth there maybe some debri which has gone and caused infection.
An x-ray is essential to make an accurate diagnosis
Next Steps
visit nearest dental clinic or hospital and get an x-ray done and then the treatment will follow
Health Tips
don't self medicate or apply anything over the area