I have done it twice in my fasts where family gathering is in the middle of my fast. I did what DL suggested. I went to both events and drank water. But with family members, I was able to explain my reasons of fasting and also benefits of it. My sisters and cousins forced and pressured me to eat, but I did not budge. Also Indian food!!!!
Here is another story I found. Prime Minister of India, Mr. Modi was visiting the US for the first time and was invited to the White house for dinner, but he was on a nine day fast so he drank warm water only. Even if he was not on a fast he would not have been able to eat some items on the menu anyway or drink the wine, because he is a vegetarian and does not consume alcohol.
Here is the full article from Wall Street Journal.
So go to the dinner, drink warm water and do not sacrifice your gaines of fasting. You can say you are following Prime Minister, Mr. Modi's footsteps. That will be a story to tell for the evening.