Generally, when a third molar is erupting such pain arises, but gum pain could also be due to gum disease. It is very difficult to diagnose this pain or tell the cause of it without examining clinically.
Next Steps
Visit your dentist at the earliest.
Health Tips
For the mean time, doing warm saline rinses will provide you with some relief.