Complain to the gym, use the exact words.
I wouldn't say that it is fat shaming but I would say that it was completely inappropriate, presumptive and rude.
In your email to the gym you also need to make clear the business case for why they need to take your complaint seriously, this isn't just about a person with hurt feelings.
It damages the whole gym's reputation. You are one of their customers. If they want women in their 40s with a belly to feel welcome and to pay money for membership and use their services, they need to understand that this is absolutely not the way to go about it.
I say that as a woman in her 40s with a belly. Not a peri belly, just a belly on my body. I use the gym at least 3 times a week for cardio, weights, core work, swimming, I go to increase my fitness, strength, flexibility, stamina, mental health. I'm still overweight but I lift more, I run 5k regularly, I need to use my asthma pump less frequently, I'm sleeping better etc. I don't want to join a gym or continue a gym because I want some young goddess to give me a flat tummy, I want to work out to look after my bones, joints, muscles.