This is an awful thing to tell your daughter, OP. You made her feel like crap and it's very unlikely to motivate her to sort her weight out (which probably doesn't even need sorting).
I gained a few kilos (think 5 or so) around the age of 13 and my mum and her friends would constantly comment on it, making me feel like crap about my body when little did they know that I was only binge-eating because I had just suffered a very traumatic sexual assault and was already loathing myself and my body. Needless to say my mum's comments didn't help and I never forgave her for it. Like you, she probably felt that "as a mother she should tell me I was starting to be a bit chubby" but I would rather she had kept quiet.
Fast forward a couple of years and I am at my skinniest (yet I still eat chocolate everyday and yes, even in the middle of the night and guess what? I don't even hit the gym!), but I rarely eat more than once a day and become quite self-conscious the second I see even a hint of my belly showing. I am not anorexic or bulimic as I eat pretty unhealthily and don't make myself throw up nor would I ever, but I have a very twisted relationship with food. I look at pics of me back then sometimes, and yes I was slightly heavier that I am now but I was NOT fat. Now my family comments over "how skinny" I am but I seriously would rather have my old body back than feel guilty when I eat more than once a day like I do now for fear of having to hear the nasty comments of "concerned relatives" again.
By the way, in case you don't know, it's actually MUCH easier to lose 20 kilos when you are massively overweight than 4 when you only have a few extra kilos (so you probably have less of an excuse than she does) .
But would someone close to you telling you, you are fat, or look crap in your clothes on a day you feel great about yourself motivate you to lose the extra weight or would it only make you feel self - conscious about your body and a bit shit about yourself and your appearance? There is nothing motivating in what you told your daughter. And while I am sure my mum attributes my loss of weight to her nasty comments, I only lost weight when I moved far away from her toxic self and stopped feeling depressed (from mostly being around her and people like her).
If weight is so important for you, focus on your own, lead by example. You are asking your daughter to sort something about herself you haven't bothered to sort for yourself throughout her life because you were too lazy/busy to do it and expect her to listen and take you seriously just because " you know what it's like to be fat". She probably doesn't see herself as fat. My mum was also overweight (not obese but definitely above average) and I always found it doubly irritating that she would feel the need to comment on my weight when I was taller and skinnier than her so hardly ever felt "fat" when standing next to her. I would have found her comments as irritating and as hurtful had she been skinny but at least I wouldn't have felt she was being hypocritical to expect me to lose weight when she couldn't be arsed to do it herself.
Ironically the only person being mean and bullying me over my weight gain as a teen was her.
Chances are nobody would have commented negatively on your daughter outfit but now you have and she will probably always feel a bit self-conscious when in that outfit. If you have struggled with your weight for decades you probably have passed that on to your daughter so the least you can do is teach her to embrace her body. She doesn't need to be extremely skinny to be ptetty and healthy and as long as she isn't obese and suffering health issues due to her weight, she shouldn't be made to feel self-conscious by you.