Thank you for the query.
According to the history given by you, it appears that pain which you are experiencing may be because of the sensitivity developed after the gum surgery . Headache may be because of any infection in your teeth or gum leading to radiating pain
in the head region. I would suggest you to take ibuprofen
with paracetomol combination for pain. See your dentist
to rule out presence of any infection leading to pain . If still pain persists then it could be due to some other cause , for it see your physician .
Hope this information helps you.