I would try taking a probiotic in the meantime. I would also talk to your doctor about small intestinal bacteria overgrowth.
If your diet and food quantities haven't changed remarkably, the weight gain is a flag. Two types of doctors need to be brought into this situation: your Gynecologist and a Gastroenterologist. Since female organs share the same space as the lower GI, they need to be evaluated and eliminated as a possible suspect before moving on to the digestive system as the next culprit. (Disorders of the female organs CAN silently affect the digestive tract & cause weight gain in some cases)
Your GI symptoms could indicate a recent change in your tolerance of some types of food or even a recent food allergy. Celiac Disease, for example, displays your types of symptoms in individuals who are no longer able to metabolize gluten (found in wheat, barley, and rye). Your doctor may order a stool sample to check for any bacterial or other microbial reasons for your symptoms (though 2 years is a very long time to live with either of those things!)
Hope you find relief soon!