A similar thing happened to me when I was pregnant. I had pain on/off in the GB area for several months, then a severe attack when I was 7 months pregnant. The stress on my system, combined with the dehydration from vomiting, started contractions, and my son was born 9 weeks premature. (But he is fine now, at 7yrs old.)
Eliminating gluten was what finally helped me. My practioner did some simple tests, and we discovered that I am gluten sensitive. Apparently very common in people of N. European descent. Not celiac disease, but a sensitivity. MOst gluten containing foods are not good for you, anyway--cookies,etc. Rice flour bread/pasta/cereal is widely available, so giving up wheat and other gluten containing grains is not a huge sacrifice. I also quit dairy and soy, which can have similar inflammatory effects. Years later, I am pain free!