Dear Sir,
The pain could be due to a cavity in that tooth or could be due to food particle stuck between the tooth and gums.
Please visit your dentist at the earliest for a thorough check up to determine the cause of pain and gum swelling and get treatment done accordingly.
Health Tips
You can do warm saline rinses at least thrice a day to help relieve the pain and swelling, however clinic examination will best help the condition.