Actually, there is a gender pay gap, but the entirety of it is determined by 'legitimate' factors—things which make men's and women's labour different. As well as women having jobs they rate as more pleasant, and jobs that are objectively less risky, as well as doing more part-time work, women leave the labour market during crucial years, setting them substantially back in labour market terms. That is, the gap comes down to women's choices.
This is not necessarily a bad thing, since childcare seems to contribute to mothers' well-being and happiness, and looking after children is certainly not an unimportant task. But it implies that, whether or not society as a whole, through schools, culture, upbringing and so on, is the reason women do most of the labour in the home and in child rearing, firms are not discriminating against women.
Two new papers add to the formidable base of evidence for this conclusion. In "The Gender Pay Gap Across Countries: A Human Capital Approach", authors Solomon W. Polachek and Jun Xiang take a lifetime labour supply approach. They find that the wage gap increases with women's fertility, the size of the average age gap between men and women at marriage, and the top marginal tax rate, all things which affect women's total labour supply over their lives and at crucial points. (It decreases with the prevalence of collective bargaining).
An even more interesting approach came in "Fertility Effects on Female Labor Supply: IV Evidence from IVF Treatments" by Petter Lundborg, Erik Plug and Astrid Würtz Rasmussen. To abstract from the possibility that women who decide to have kids have systematically different characteristics affecting what kind of career they'd have, they look at those who try to have children via In-Vitro Fertilisation (IVF):
This paper introduces a new IV strategy based on IVF induced fertility variation in childless families to estimate the causal effect of having children on female labor supply using IVF treated women in Denmark. Because observed chances of IVF success do not depend on labor market histories, IVF treatment success provides a plausible instrument for childbearing. Our IV estimates indicate that fertility effects are: (a) negative, large and long lasting; (b) much stronger at the extensive margin than at the intensive margin; and (c) similar for mothers, not treated with IVF, which suggests that IVF findings have a wider generalizability.
The results are pretty clear. Women are on a steady upward trajectory, likely in line with comparable men (as seen in previous studies). They then decide to take time out to have and raise children, and never make it back to their previous trend-line, perhaps moving to more flexible work or less demanding jobs. Even those who go back to similar careers are far behind in experience and have to catch up with movements they have missed.
So, while there might be such thing as a gender wage gap, the alternative is completely changing how children are raised in society, and while this would certainly have the potential to raise measured output, it may not necessarily raise total social welfare.