You could be having a toothrelated problem ..either diffuculty of a wisdom tooth to erupt in ur mouth or an infectedtooth causing pain. And infection spreading to gum area .. Hope u see a dentist soon because it can even get infected n turn into a bigger swelling and lead to further discomfort n complications .