It really could be a number of things. Is there a puncture mark? Maybe a bite or scratch wound. It's possible that a bug bite could have done something similar. It's also possible there may be something going on inside the mouth. If it remains swollen, I think a trip to the vet would be in order.