Thanks for asking the query,
As the area behind the last tooth is difficult to clean, there is often food accumulation and bacterial deposists there leading to redness
, swelling and inflammation of the surrounding gums.
I would suggest you to visit Dentist
and get the checkup done,take an x-ray of the involved tooth if needed.
Meanwhile go for symptomatic treatment like lukewarm saline gargles, use antiseptic mouthwash solution gargles twice to prevent infection and promote healing.
Go for complete mouth scaling and polishing.
Apply mucopain ointment topically over the affected area.
Hope this helps out.