Germans are incredibly direct. A German really will ask you if you've gained weight (Haben Sie zugenommen?), just as someone might ask if you have lost weight at another time (Haben Sie abgenommen?).
What's disconcerting for people from the States, for example, is that this question is simply a matter of fact for a German and by no means a judgement. Ask any American if s/he has gained weight, and you'll probably get an angry response. Here, that's simply a rude question. Weight is a hot-button issue here, and it's par for the course that someone might ask you if you've lost weight, and then
follow it up with a compliment, no matter if your answer is yes or no.
The German asking you really just wants to know if you've changed. It's a Feststellung, an ascertainment, an observation. A simple answer of yes or no will suffice, as painful as it can be to answer that question. You could even go for the confusing answer and respond with the brilliant "jein," a combination of "ja" and "nein" that simply means "yes and no."

