The plan to produce the Kwisatz Haderach was that all Bene Gesserit would have daughters only, until the time was ready (and we know that Jessica Atreides disobeyed). All this stems from the idea of the Bene Gesserit choosing the gender of their offspring. How are they able to do that? Jessica gave birth before taking the spice, if I remember correctly, so, how is she able to decide she will have a son? Is that ever established?
Since the Bene Gesserit/Kwizatz Haderach are able to mentally control their metabolism and basically all the inner workings of their bodies, hence their ability to control aging, I always just assumed that when they got pregnant they manually made their babies girls. By either denying it the enzyme to become male or manually removing the Y-chromosome.
All Bene Gesserit have this power; spice has almost nothing to do with it.
There are several techniques to influence the gender of the child, so I presume that the Bene Gesserit have perfected these.
Most of these techniques are considered old wives' tales though.