I think this is great advice!
Also, I wouldn't jump to conclusions here. Maybe because you felt self-conscious about your hair, that read off as something else? Perhaps they found someone more qualified for the job? Who knows - they may have hired you, and then someone who knows someone who knows someone got them the job instead - I have seen that happen before. I'm just saying, don't assume it was your hair.
It sounds like you have not yet embraced you curly hair. I for one used to hate mine as well, but I learned to embrace it and love it and it is now such a huge part of who I am. It is a big part of my identity, and I can't imagine being without it.
I have to agree with Curlangel - I think the best thing to do is to ask your boss to meet with them, and ask why there was a change, and see if there is something that you need to work on. It can only help. If there was something else going on, like a performance issue, your genuine care about wanting to do well will win you some brownie points and may help you down the line. If, in the end, you hunch was right, then I think it best to start looking for somewhere else to work. Who wants to work in an environment that judges you biased on something like your hair - it's right up there with being sexist or racist.
You don't need that.
Curly hair is a challenge, no doubt, but it's who we are and you shouldn't have to hide it.
Please don't go back to relaxing! Just let your curls be who they really are