OP, I'm really sorry that this has happened to you, but I think you've been offered some wonderful advice in this thread and I hope it helps you.
I don't think that your boss was acting out of malintent. She seems to care about your career and appears to have a vested interest in your success. Is it ignorant that a bun can still hold up one's promotion? Yes, it is, but not when you consider what another poster stated, which is that if the cultural milieu of your company is anti-bun, then you're going to have to be consistent with what they deem be acceptable or, unfortunately, find a new job.
My thing is, I do agree that you should play the game. I also agree with the advice that perhaps it's not the bun itself, but that the bun is a proxy or encapsulates other aspects of your appearance that might be hindering your progress. Yeah, maybe you do need to get new styles and to wear your hair down more often. From that standpoint, by all means, do what you need to do.
But the thing that really bothers me is, after you wear your hair down, then what? What else are you, or anyone else, going to be asked to change to conform to a company's ideals? Are they going to ask you to lose weight? Gain weight? See a dermatologist because your skin looks jacked up? Wear less makeup? When does the intrusion end? It's not just the issue of navigating the corporate world as a woman of color; it's navigating it as a woman, period, in a society that cares more about how we look than what we do.
Sorry for the vent; this situation is so bothersome to me. And I feel that it happens more to "us" than to other people.
ETA: By saying what I said, it doesn't mean that I think you should continue wearing a bun if it happens at the expense of your progress at this company. I'm just musing/venting because it just doesn't seem fair. All in all, just get that money, so that when you make it to the top, you'll exercise greater sensitivity for other people trying to make it. Get to the top so that women to come won't have to grapple with the issues that are worrying you today.
That's one of the things I tell myself when I feel discouraged with school.