Why are my teeth and gums aching?

There are different. Causes why teeth and gums can hurt. People who brux especially in their sleep can wake up with headaches as well. Moderate to severe periodontal disease can cause teeth and gums hurt. The pain from infected tooth/teeth is worse. Pressure from erupting wisdom teeth esp w/o enough space can cause it too. Sometimes, there are cases where an M.D. Can be involved if it is systemically related.
Good question. The answer can only be determined by seeing a dentist who can personally examine you.