visit dentist an emergency treatment can be done to reduce the pain. if any invasive procedure is required take your gynacologists opinion prior to the procedure.last trimester is also safe to undergo any treatment provided your blood pressure is under control and you don't have any complications.
Next Steps
visit your dentist and ask for emergency treatment after gynacologists consent. postpone the final treatment till the baby is born. good luck.