The physician Hippocrates gave us the Hippocratic oath, but his actual medical knowledge was sorely lacking. Well, that was 2500 years ago. But the medical texts he and his followers left behind were very influential in the their day, and they had plenty to say about women’s bodies and childbirth, including advice on how to bear a child of the preferred sex.
As this system of medicine developed, Greek women had the option of skipping shrines and heading straight to a Hippocratic doctor. In the Hippocratic world, women were naturally weak, damp, and cold, while men were strong, dry, and hot. Doctors believed that conception resulted from a fight between “strong” male seed and “weak” female seed, with the winner determining the child’s sex. Hippocratic doctors advised parents hoping for boys to consume hot, dry, and strong foods, such as red wine sprinkled with black cumin. To conceive a girl, Hippocratic doctors prescribed wet, cool, feminine foods, such as lettuce and white wine.
Further advice on conceiving a boy or a girl involved more drastic measures. Read about them at Atlas Obscura.