1 Excess gas and bloating may also be a symptom of bacterial overgrowth in the small intestine from conditions such as diabetes.  Food intolerances. If your gas and bloating occur mainly after eating dairy products, it may be because your body isn't able to break down the sugar (lactose) in dairy foods. Other food intolerances, especially to gluten — a protein found in wheat and some other grains — also can result in excess gas, diarrhea and even weight loss.