Thank you for your post and what a great question. I'd like to think that we can all be honest when we're asked this, but I do agree the reality is that some people are asking out of politeness and do not really want to know.
For me personally, it varies- it depends on the person, time, place. If I'm walking my dog and a stranger comes up to me and says "hello, how are you?" my answer is going to be different then if my friend asks, and that's going to be different to if my GP asks. I might say something like "fine thanks", "yeah, I'm alright", "been better", or "well, at least the sun is shining today" (or something similar).
While I can understand not wanting to give off negative energy, sometimes that's just how you feel - and you won't always feel this way because some days will be better than others.
If you were to go up to your gelato server again, what if you were to try something like "I'm not great today, but it means a lot that you asked". ?
It's really hard and I don't think there's a right or wrong answer, just trusting yourself and what feels right at the time.