I must preface that the original question as it stands is way too broad.
It probably needs to be cut down into smaller parts, but that's hard to know how to do if you are a layperson. This question really is an enormous one, and although there are a lot of answers that give bits and pieces of info, because the question is so broad, there are going to be lots of opportunities for people to answer this question with a heavy slant one way or another, with varying quality of information. It's easy to cite a few papers in isolation and present it as the smack down conclusion for one side or another.
Is there gender discrimination?
Women are paid less than men for various reasons, and it's
complicated.
Some of it is gender discrimination, and some of it isn't.
It's very easy to misconstrue how strong or weak gender
discrimination's impact is.
Even if the total pay differential explained by discrimination was only 3-5% as some people so far have suggested (it is almost certainly not), that is still often the equivalent of two or three raises at a job. I remind everyone participating in this discussion to be civil, according to the rules of the site, and not to use the presentation of "objective fact" as an excuse to be untactful or ungraceful with how you present your case.
Let me give my best effort to scratch the surface of this question. I try to provide direct, un-paywalled PDF links to papers where I can. Otherwise I will link paywalled links to the papers.
For now, I will only discuss a few of the papers provided below, and will leave the other papers as relevant further reading. Some of the papers are much more technical than others, and some papers probably can be left as further reading, rather than having any additional commentary. I will also consider making this answer a community/wiki answer, so that others may provide good commentary on the extra papers, or provide new papers that I have missed, since there are so many papers that are relevant to this topic.
Labor Demand and Labor Supply
Sometimes pay differentials are attributed to a "taste for discrimination" as it is known in the literature (either by consumers or employers). The existence of monopsony power, which is where there is not perfect competition for the supply of labor and an employer can push wages below the marginal product of labor (the value of your work), may be an alternative explanation for a wage differential.
There is evidence that monopsony power does exist in markets such as the nursing industry. Nurses may see hospitals as highly differentiated (different labor practices, safety, location, etc.), and "wage standardization" programs may effectively amount to collusion to depress wages among hospitals.
If monopsony power by firms depresses wages though, then this raises the question: Does it do so equally for men and women?
These are two papers that study pretty different markets (US grocery stores data and German employer-employee data), but both try to achieve the same goal of estimating the labor supply elasticity between men and women. That is, can firms exert more wage pressure on one group compared to another? The interesting thing about these studies is that they look at how elastic both groups are at the level of the firm, and not just at the level of the market. What does this mean?
In the labor market as a whole, women are usually observed to be more elastic than men, implying that for one reason or another, they are more sensitive to wage differences. Does this mean they can afford to be choosier with which jobs they take? Well, once workers are within the firm, for some reason women then are less elastic than men, which means that the firm has greater wage setting power over women due to monopsony power. From the second paper:
Our results imply that about one third of the gender pay gap might be
wage discrimination by profit-maximizing monopsonistic employers.
The second paper tries to build off previous work (including some from the authors of the first paper) by trying to model search frictions. They do not wish to assume that transitioning to and from non-employment is wage-inelastic (that wages do not affect how easy it is to quit and look for a better offer). An open question that these papers don't answer is why exactly women may end up being more inelastic than men, more unwilling to quit jobs that may underpay them.
But despite the healthy caution the paper gives as to how much of a role gender discrimination plays, consider the note from the second paper:
Whereas Robinsonian discrimination provides a relatively simple
explanation for the persisting empirical regularity of the gender pay
gap, it is difficult to interpret this pay gap as a long-run
equilibrium outcome using Becker’s (1971) concept
of discrimination due to distaste without assuming some sort of market
power on the demand-side. Moreover, employers’ actions remain
profit-maximizing when engaging in Robinsonian discrimination, whereas
they are biased by costly prejudices when engaging in discrimination
due to distaste because their profits are reduced in this case even
if employers have considerable monopsony power (see, e.g.,
Bowlus & Eckstein 2002)
This means that when you consider older models of price discrimination (e.g. Becker), where discrimination due to distaste is mostly waved away due to the desire to be profit-maximizing, those models consistently don't hold up in real life, and models that include explicit discrimination (e.g. Robinson) are more consistent with what we actually see in the data.
(I do not provide a pdf to the 2010 version as there seem to be significant changes between that paper and the final copy in 2012. I cannot currently find a straight link to the 2012 copy.)
This paper looks at improving traditional models of household production in a few ways, with one of them being by modelling child outcomes as a public good. As a whole it looks into a big question: if the wages of a mother or father changes, how does that affect who takes care of children, and does the gender of the parent matter in child outcomes? That is, is it better to empower men or women if looking to raise child welfare?
One reason people argue that the wage differential between men and women isn't inherently gender discrimination is because women naturally prefer to stay at home and say, take care of children, or commit themselves more to household production. Then, rational employers who are profit maximizing may pay a woman and man of equal skill differently because they expect the women may end up working for fewer hours in the future, even if the woman currently is unmarried or has no kids. Before going any further, it must be noted that this reasoning by itself would constitute statistical discrimination, which has its own literature.
However, this paper makes some interesting empirical findings regarding the household production angle. Men and women do have different preferences for what things to work on for household production, including childcare, and when you look at who is more effective at childcare, the authors find that given equal time with kids, an extra unit of time spent with the children is slightly more effective if done by the mother than with the father. So far seems normal, right?
But because there is such a large disparity between how much time the father and mother spend time with children, it would be more effective to empower men (!) to spend more time with children. If you look at the effects of raising a father's wage compared to the wife, what happens is that the man spends more time working and less on both childcare and other household production. The woman will spend more time on both market labor, childcare, and other household production, with less time in leisure.
Therefore, large pay differentials can adversely affect child outcomes, because if firms acting in such an aforementioned "profit-maximizing" way end up paying men and women of equal skill differently, it will not account for public goods such as childhood outcomes. The problem gets more complicated when you consider what happens when a wife's wage increases compared to the husband's wage. If the woman's initial wage is low, wage increases will actually decrease market production, until the wage is increased to around the average wage.
Modelling a household's use of time is very complicated. You cannot perfectly explain away the gender pay gap using just household preferences.
Human Capital Investment
What can be attributed to the differences in the rate of return on education between men and women? Even when controlling for personal characteristics, women are paid less than men, and part of the reason for the increased rate of return women have to schooling, is that better educated women seem to be better equipped to deal with discrimination. This paper dis-aggregates an index of discrimination using Oaxaca decompositions based on years of schooling, in order to make this point. Not all of the difference in the rate of return to schooling is attributable to discrimination however. Women choose to work in sectors where education is highly valued.
Compensating Wage Differentials and Discrimination
From the abstract:
Better-looking people sort into occupations where beauty may be more productive; but the impact of individuals' looks is mostly independent of occupation, suggesting the existence of pure employer discrimination.
Statistical Discrimination
Most work on statistical discrimination focuses on race. Suggestions for work more focused on gender are particularly appreciated.
(This is from a larger book on labor market discrimination.)
(This paper may also fit in the section below.)
Statistical discrimination based on rational stereotypes are not sufficient to explain differentials in employment duration.
Non-Wage Discrimination
Not all discrimination is through wages. The heavy use of wage equations in the discrimination literature leaves some gaps when it comes to non-pecuniary benefits, discrimination in offers, unemployment duration, risk of non-employment, etc.
For example, consider if all men and women of equal skill have the same cutoffs for when they would accept or reject a job. Men and women of the same skill then have a different distribution of offers they may receive due to discrimination, with men receiving on average higher offers. Then over time, one would observe that men and women will select into jobs that pay based on their skill, with some gap because men on average may get better offers. The magnitude of discrimination (the full distribution of offers) may be obscured by the observed wages that are accepted.
This paper looks particularly at race, rather than gender, but can be further applied to gender in newer studies. Discrimination in terms of wages offered tend to result in smaller observed discrimination if you only look at wages accepted. In this study, the differences between ethnic groups was three times greater for wages offered than for wages accepted.
The gender discrimination literature has many facets, with a lot of plausible evidence for its existence, from all sorts of angles. Many related papers on gender discrimination can be found if you look through the citations of the papers I have listed above. The statistics that politicians may cite are not the same as what economists will actually tell you, so take whatever activist, blog, editorial/opinion column, or social media personality says with a grain of salt.
I will not provide a hard number for how much of the gender pay gap is attributable to discrimination because doing so accurately is almost impossible. Anyone who tells you a hard number may indeed be (inadvertently) lying to you, but this is a very difficult topic to approach, so some grace is needed when we discuss gender discrimination.
Comments on papers to add, or criticisms of papers listed are welcome.