There could be two things happening. First your gum problem. By gum problem do you mean bleeding of gums or swollen gums
. If yes the treatment is scaling. In layman's term it means cleaning of teeth by use of ultrasonic machine by the dentist
. Ideally every year one should get it done as per advised by your dentist. Secondly feeling pain
that may be because of pocket formation in your gums like spaces in between your teeth where food lodgement occurs nd may have lead a to cavity. So basically its cleaning and probably filling that needs to be done.