To say that to you at work is IMO an insult, even if they don't consciously mean it to be.
If you're training for the long jump and another competitor says "women are naturally better at the high jump" that is a criticism, and this is the same. Your colleague has basically said, you are better at doing something other than what you and I are here to do solely because of your gender, not because of your skills or experience or personality. (Unless you see each other outside work a lot and your conversation was in the context of that relationship. And by that I don't mean if he said it in the pub after work drinks.)
It's a sexist remark because it treats you as an instance of your gender, not as an individual. It means you are just a female, and we're all the same, aren't we? Your gender is more important in something as important and complex as what sort of parent you are, than your personality, experience, upbringing, temperament....really? All women are the same, and super at wiping up sick, hence off you go girls and let the men get on with the interesting, fun, moneymaking stuff.
I work in a male-dominated industry and DP is a SAHD. I just came to the end of the busiest season which involved a lot of time away from home (various trips from 1 day to 3 days, but a lot of them over the last 10 weeks or so). If someone at WORK then said to me "well women are just better parents naturally" I don't think I'd be responsible for my actions.
But I wouldn't be having "women are x and men are y" sort of conversations anyway. Partly because when you don't fit into the stereotype all you ever end up saying is "not in my house", and partly because I don't think they ever end well. These conversations between colleagues are like discussing salaries - best not to go there.
That's really interesting AThingInYourLife
DP and I have the exact same conversation in reverse. So he is "don't do it darling you'll fall" and I am "she's got to learn, let her give it a go". I would say the protective response comes naturally to a primary carer, while the independence response comes naturally to the secondary carer who spends the bulk of their waking hours focused outside the home. It's not innate to being the one who was pregnant or who breastfed.