This could possibly be periodontitis which is inflamation and infection of the ligaments and bones that support the teeth. If this progresses it can lead to subsequent tooth loss.
I would recommend that you go to see a Dentist as soon as you can.
There are a number of treatments that can be recommended.
Sore gums can be a result of various reasons. This can be because of poor oral hygiene, deficiency of vitamins, drug allergy, disorders of the gums and teeth etc. Proper oral care is the key to good oral health. Also taking of multi-vitamins and vitamin C, use of soothing gels may help. Also it is best to consult your Doctor for an examination as your problem is since several months.
Hope this helps.