What could be the cause of the swelling that I have in the gum around the area where I had a root canal?

Infection. Swelling usually means infection, but not always. Could be from untreated accessory canal, split tooth, gum disease, infected adjacent tooth, or other reasons. Go back to your treating dentist to have situation reviewed, diagnosed, and treated.
Several possibilitie. If you are having swelling around a tooth after a root canal it could be any one of several things. Extra canals, cracked tooth or root, perforated root, flareup of the abscess at the roots end, etc. Get to your dentist asap for proper treatment and diagnosis!
Gum swelling. If you have swelling in your gums around a tooth that has had root canal, it come be a root canal that is still infected. It could also be a periodontal infection or a gum infection. In either case a visit to your dentist to evaluate the problem would be a good plan. Good luck with it!
Infection. Usually swellings right after having a root canal treatment is due to inflammation and normally goes away in a day or two with medications. But swelling long after having the root canal treatment indicate infections at the root tips that might require retreatments or removal.