Sometimes, a tooth becomes very inflamed and since the nerve endings are connected to the brain, this, in turn, makes the pain travel to different parts of your head. You may be suffering from a bad cavity which is giving you a major headache. See a dentist soon.