My dog is just sitting in one spot, constantly smacking his lips, and refuses to lay down. When I get home from class he was jumping on me but whining while doing so. Once he calmed down he was just whining. He does look to have a swollen, maybe infected, gumline above his back molar on one side. But I don’t know why he wont lay down. I thought it could be bloat but he doesnt seem to be foaming at mouth or trying to vomit. He just wont lay down and seems very uncomfortable. I cant afford a trip to the emergency vet right now.
Being restless and refusing to lay down, acting uncomfortable as you describe could be signs of a lot of diseases. Here is an article discussing this very issue:
http://www.vetstreet.com/dr-marty-becker/why-doesnt-my-dog-sleep-at-night
One of the most worrisome, as you describe is bloat which you can read more about here:
https://www.vetbabble.com/dogs/health-dogs/5-warning-signs-bloat-save-dogs-life/
However, it could also be a number of other conditions. While your symptoms did not list vomiting, this article talks about many things that cause a dog to feel uncomfortable as well:
https://www.vetbabble.com/dogs/health-dogs/vomiting-dogs/
Included in the article is a mention of pancreatitis, which can cause discomfort as well which you can read more about here:
https://www.vetbabble.com/dogs/health-dogs/pancreatitis-in-dogs/
The gumline being swollen and having a molar that looks bad could be a sign of dental disease which you can read about here:
As mentioned at the beginning, there is a lot of things that could cause your dog to be uncomfortable, and the best way to understand what the underlying cause for illness in your dog is to see a vet that can give your dog a proper physical exam and run the appropriate tests to help you find out the underlying cause of the symptoms you describe.