If you do the salary average, which is what created this article's headline, of course women will earn less. The higher paying jobs like engineering are mostly occupied by men. If you ask me, it's because women are less interested in that, but if you go the "women are discouraged from going in science" route, the issue still isn't with the pay.
Except for rare exceptions where there's actual huge misogynists in power, there's no pay gap, it's a lie. If you absolutely want men and women to earn exactly the same in average, you're going to have to force women into jobs they aren't interested in, or pay women more than men for the same job.