I felt this way when I found out the sex of my first baby. It was a girl. Words cannot describe how much I wanted a boy; I was devastated. It's not something you can admit to in many circles; hardly any in fact. It's still a taboo subject for many- I have watched the general opinion on MN become more understanding over the years, but the topic is still very divisive.
I now know I was suffering from ante-natal depression. All my fears and anxieties about having a child were projected onto the gender of the baby. I hated, hated women who were pregnant with boys as I so desperately wanted one. I didn't like girls and felt that my life was ruined. I thought that I would never accept it.
I had counselling with the ante-natal counsellor attached to the hospital- think about speaking to your midwife about this. Interestingly, my counsellor said that she had seen lots of couples, particularly mothers who had experienced gender disappointment after years of infertility, miscarriages and IVF. In a way, she said that they had had more time to construct an image of 'their child' in their head, and had naturally ascribed it a gender. Most commonly, the imagined child was a girl and they were pregnant with twin boys. I was green with envy at the thought of them having boys. I felt like a failure who had spoiled my life.
I also had to face up to a lot of issues of my own- including my own relationship with my mother and issues I had with my own gender. I felt as you do about princess dresses and 'girly' things; one of the reasons I hated them was because I didn't want a girl, and I had to challenge my own perceptions of gender and its signifiers. It's not as simple as telling yourself that girls climb trees too. It was my biggest soul-search to date, and one I am very glad I did- there are positives to feeling the way you do in terms of getting to know yourself and dealing with issues before your baby is born, even if you can't see or feel them now.
And then she was born... and she wasn't a boy, but she wasn't 'a girl' either. She was mine. She was an Angie.
I still felt disappointed, but every day the disappointment lessened and was replaced by love for her. It wasn't an instantaneous process, but I fell utterly and hopelessly in love with her in a way which I could not have anticipated. You cannot know how you will feel once your baby is born; don't try, it's impossible. Just know that you will love her, and you will love her a thousand times more than your imagined daughter. Have faith in that.
I am now in a place where I would not swap her for any other child of either gender, sparkly princess dresses and all. I have even had another girl and feel my family is complete.
Good luck