I always ask people if they have anything they can't eat. I always leave the food in the middle of the table for people to serve themselves. If I'm cooking curry, I specifically check beforehand that people can eat it. I try to make sure that we have at least two vegetables so if people don't like one, they can have another. If, when I've tried to come up with something appropriate, they just made rude comments or put on a face like a slapped arse, I would be annoyed.
Manners are the real issue here. A few years ago I went to dinner at a friend's house. She served rice as a side dish, but had done some potatoes for another person who didn't like rice. The non-rice eater sat at the table and said 'Rice is disgusting. Exactly like slugs. I don't know how you can eat it.' That is just bloody rude, as well as totally unnecessary. Why couldn't she just thank her hosts for a lovely meal? Nobody was even asking her to eat the effing rice!
DH and DD are coeliac and I throw up at the smell of fish and seafood (no idea if this is an allergy, never got close enough to one to find out); we always tell people when accepting an invitation for a meal. I feel quite apologetic that we're awkward to cater for, but people are always charming about it. And for some of the really dedicated types, they adore rising to the challenge.
On the four occasions in my adult life where fish has been served to me, I've been absolutely mortified and very apologetic on three of them. Not able to eat it and really sorry it hadn't been mentioned before (they all happened a long time ago, I've learnt my lesson now). On the fourth occasion, it was my SIL and she already knew but served up a sauce full of prawns anyway. 
To go back to the OP, I think you're confusing two issues here. It is not acceptable to be rude about food you're being offered in someone else's house when you've accepted an invitation, so YANBU there. On the other hand, I think you're really struggling because you're offering them something you used to love eating and no longer can
. And if they don't want it, that makes you angry with the whole situation. I really sympathise (my DD has only just been diagnosed and now has to say no to lots of things she likes) but I think YABU.