My OH wanted a boy desperately. We already have a daughter, and throughout the entire pregnancy he made it clear that he wanted a boy more than a girl, and that we would only have one child, because that's all he wanted. When she was born, of course he loved her, but he still wanted a boy, so we TTC another baby. I always wantged two kids, so I was chuffed. I knew he loved our daughter more than anything, and before we TTC another I told him that if this baby was a girl too, he had to be okay with that, and he had to love her no matter what. He said that of course he would.
We had a gender scan and it is another girl. I could see his disappointment, but he accepted it. He went to work and when he got home he picked up our daughter and cuddled her and said "I don't care if we're having another girl, because you're so amazing that I know she will be too".
In the end it will be okay, you will see. It's good that you know you're having a girl, because it gives him time to get used to the idea before she's born. It's harder for the dads I think because they don't feel the baby like we do. We usually bond through their kicks etc, which we feel all day long, but our partners only feel them when they put their hand there; it's a lot harder for them. My OH admitted that he didn't have a bond with our daughter until she was born, and it will be the same for this baby too, but I'm sure he will have a good bond once she's here.