Feeling of gas could be indigestion, which can be a cause of headache in some people. Your headache can also be due to muscle cramps, which too is common in indigestion.
Next Steps
I suggest you consult a homeopathic doctor for proper case taking and medicines to deal with acidity, indigestion and headache. Proper diet and lifestyle advice can also help you maintain a healthy routine and get rid of your complaints.
Health Tips
Suggest you to drink more water and continue with some form of exercise or walking.