Need to see a picture of the affected area. But if it is a mild pain then it can trauma which has been due to hard brushing with toothbrush. If the pain is more it can be due to marginal periodontitis Or gingivitis which is due bad oral hygiene or food lodgement between gums and the teeth.
Next Steps
ICPA pyosan gum paint massage on the gums for 1 minute , twice daily,.hexidine mouth wash
Health Tips
Soft bristle brushing over the affected area twice daily.