Very aptly put. It reminded me a quote by Henry Ford: "If you think you can do a thing or think you can't do a thing, you're right."
We must encourage the women (and also the men) entering STEM courses to persist even in case of initial difficulties.
Another point, which is not discussed in the article but is somewhat relevant in this discussion (although not directly addressing the gender gap, per se) is: the US school level math has become almost a joke, because it's been watered down so much in the names of various reforms and various (perceived) societal needs and thus it instills false and undue confidence amongst many university entering students. [1,2]
Such students when encounter a subject like Calculus-I in its full glory and depth, they naturally get frightened. Even if they somehow get past the Calc-I hurdle (e.g. after remedial coaching etc), they are not in a position to handle the cognitive load needed to sail through the entire STEM courses.
[1] http://www.mathematicallycorrect.com/ [2] https://en.wikipedia.org/wiki/Mathematically_Correct