Lisalisa, I had the same thing, but luckily (I guess) mine started later at 7 months pregnant. I couldn't eat anything either, even a small plate of steamed veggies would cause an attack. Anyway, existing solely on a diet of small snacks and heaps of coffee didn't do my son any harm. He was 4.2 kilos at birth. (Just fyi, he does have horrible food allergies which are completely explicable wrt family history and have nothing to do with the whole gallstone thing. I just don't want you to read about that in my other posts and then wonder.)
You should check elsewhere in regards to the surgery. When I was diagnosed, I was told that if I had been a bit earlier and the baby had been in a better position (he was back to back and shoving his knees out for all it was worth), they would have done the surgery. At any rate, they did think that an emergency surgery might be necessary, so I met the surgeon, went through what would happen just in case and all that. The attacks were horrible and did happen regularly, despite not eating. The key is to take the drug (I took demerol, which I think is in the same family as tramadol) as soon as you start having an attack. It takes a while (30 minutes or so) to kick in and the attack is not going to get better. Don't worry about how many times you take it. Take it when you need it.
Have them take your gallbladder out with the c-section if they can. They're in there anyway. I'm serious, it didn't get better for me and I had mine out 6 weeks after birth (after another bad attack).
Luckily I previewed this post. It sounds really dire, but it was just one of those things. I wish I could give you more info, but I've forgotten most of the details. It's not so bad, except when it's happening of course, and it will end. Not much help to you now, but I do want you to know that there have been no lasting effects for us.