Ask for detailed clarification in writing and an explanation as to what he finds unacceptable about your current work attire and how he suggests you improve it. I suspect he will be somewhat reluctant to do so.
I'm a senior manager in the CS. I don't wear a suit or high heels and I've stopped wearing make up due to menopause symptoms turning my face into a sweaty mess. I wouldn't dream of speaking to my team members about dressing inappropriately unless they were turning up in scruffy, disheveled clothing or in clothing completely inappropriate for a professional office environment such as jeans and a football shirt. I would never contemplate suggesting to female team members that they should wear make up as that is so far outside my remit as manager to be ridiculous.
I can most often be found wearing leggings with a dress/tunic and boots. I can't remember the last time I wore a suit or a jacket. I know that the MN opinion on leggings is somewhat split but I just treat them like thick, black tights. Nobody has ever said a word to me about how I dress. I am also customer facing - and not just to other CS departments. I've always found that I have been dressed pretty much equally with the people I have had meetings with.
All of you saying to the OP 'can't you just dress a bit smarter, wear heels, not men's shoes, wear make up, are your nails clean and shaped, try to fit in so you can get promotion' etc, this is 2019 not 1919. You are part of the problem that things haven't moved on.
As women in the workplace we do not need to put up with this shit. And as a senior manager this is not something that I will ever be complicit in. Like why do female airline cabin crew need to be plastered in make up and have perfect hair? Don't get me wrong, the ladies look stunning but it adds nothing to my flight experience as a woman. I just want someone with the skills to help me out onto the escape chute if the worst happens.
If you are managers espousing this view, or just onlookers telling the OP that she needs to change, then you are part of the problem. I had a male manager back in the mid 1980s who suddenly decreed that all female staff could not wear trousers to work, as skirts were far more ladylike. He was an insufferable arse. We all turned up wearing trousers on day 1 of his new regime. And on day 2, day 3 etc, etc. He chuntered a bit on day 1 and 2 but never mentioned it again.
We really can stop this sort of bollocks in its tracks but whilst ever we have women supporting this kind of shit - wear make up, wear a suit and ladies shoes, wear feminine clothing, get your nails done - we will have an uphill battle.