The way he reacted is appalling, nothing excuses the way he took his disappointment out on you.
OH already had boys when we got together, when we went on to conceive our first baby we both hoped it would be a girl.
His preference was girl because he'd have quite liked having a daughter after having only having boys boys, he thought it would be a new experience in a way.
I wanted a girl because:
Years ago I gave birth to a little boy, he isn't here anymore. I was scared about how having another boy would bring up feelings about him.
I was also worried about how his existing boys would feel about him having another one with whom he'd live with. Would they feel as though they were being replaced?
Would his ex see it that way and become difficult? (she was already less than happy about him having another child and I expected backlash)
Having a girl would have meant we wouldn't have had those worries, just like a PP suggested up thread (you were spot on, in my case)
We paid for a private gender scan which revealed the baby was a boy, OH was absolutely fine about it and happy despite hoping for a girl. Me on the other hand, I went to pieces, floods of tears ect.
What I didn't do however was take it out on OH.
It all worked out fine in the end and DS is just wonderful, we did go on to have a daughter later on but the things I was worried about when pregnant with DS turned out to be totally irrelevant.
Congratulations on your lovely little girl OP.
If he doesn't change his attitude quick time and sincerely apologise/explain himself then he should get to fuck.