It seems its due to third/wisdom molar erupting and there must me pericoronitis. Hasn't your dentist
advised some antibiotics and pain
killer for it. First of all in need to see clinical picture and an opg or x-ray of that area, before giving a final advice.
Dr. Priyanshu Singh