A New Zealand web site reported findings that cows who gained weight before conceiving  were more likely to give  birth to male calves and  those that lost weight before conception were more likely to give birth to female calves.  You can draw your own conclusion from that.

There hasn’t been any scientific study to prove that this would actually work in humans.    But it can join the long list of pregnancy old wives’ tales.