Thank you for the reply.
It does not sound like a typical allergic reaction, especially if the swelling is at the gum line. It sounds more as if it is a dental or oral trauma problem. I would definitely advise you to have it checked by a veterinarian soon, if his owner is not going to be home.
There are really not a lot of safe or effective alternatives for pain control that are available over the counter, so I would not recommend that you offer any sort of medication. You can however monitor his eating and if he is not eating well, switch him to a softer food choice until the problem is identified and corrected. If he will let you, you can apply a cold pack to the swollen area of the gum but I do not know many dogs who will allow that to occur for too long.
If his eating is not affected and if his owner is coming home soon, you could continue to monitor him to see how things progress. There would be nothing harmful in offering a dose of antihistamine in case the swelling was allergy related, but it doesn't sound like it is.
You can give a dose of non-prescription Benadryl until you could get him in to the vet clinic. The dose is 1-2 mg per pound that your dog weighs so a 20 lb dog would get between 20 to 40 mg. This can be repeated two times per day. The pill that is available over the counter is typically 25 mg. so you may need to go with the children's liquid form which is typically 12.5 mg/teaspoon (or 2.5 mg/cc). Make sure that there are no other "cold-type" medications in it like decongestants.
I hope this is helpful. My goal is to provide you with excellent service – if you feel you have received anything less, please reply back as I am happy to address follow-up questions. Kindly rate me when you are done. Thank you for allowing me to assist you.