As with all large systems in this society, this is a complicated subject. Fact is that right now women are dramatically outstripping men in terms of educational achievement and even pay in some cases (younger urban women tend to have higher salaries right now). Having said that there are a large number of reasons why the gender pay gap, though right now small at the young end, tends to grow. As noted in this
Forbes article, a lot has to do with life choices in terms of motherhood. To fix this would require that we generate as many male primary child caretakers as women. Not sure that will ever happen as biology tends to dominate that decision making.
Many other reasons are detailed in
this article and they all add up. Men, in general, put up with worse conditions and take bigger chances than women and this tends to net them more money over time. Also, maybe most strikingly, this is reflected in
Equal Occupational Fatality Day, for which the next one for 2019 is in 2030; the gender risk disparity in jobs chosen is that dramatic (and the money tends to go as a reward for working that risk).
Just talking about a blanket gender pay gap is a huge disservice to the forces at work here.