Sorry to hear about your gum pain. There are three main reasons why gums (gingiva) would hurt after a root canal. The first reason is very simple. When doing the root canal the doctor probably used a rubber dam which is held on with a metal clamp. Depending on how low the doctor had to put the clamp on the gums could have gotten irritated. The second reason is if there was decay on the tooth close enough to the gums they could get irritated from the removal of the decay. Finally gum tissue can get irritated from the irrigation solution that is used.
These are just usual cases. The best solution would be to go back to the doctor that did the root canal for an evaluation. There should be no cost for this as it is associated with the root canal. Hope this helps.
My best to you!
William F. Scott IV, DMD