We've been shit every time they've measured going back at least to the 60s, maybe earlier. This "we used to be good at education" is a myth. We are and have been a nation of dumb.
We were crap in the 60s but hand-waved it away:
https://mobile.nytimes.com/1998/02/25/us/us-trails-the-world-in-math-and-science.html
I was thinking farther back to the thirties, forties, fifties.
http://www.cfr.org/united-states/remedial-education-federal-education-policy/p30141
During World War II, America rapidly became dominant in innovation and engineering even though we had badly ignored military science in the decade leading up to that conflict. Part of that was our superiority in education at the top - our people were better able to seamlessly switch to another discipline or pick up a new technical trade - but another part was the superior education of our enlisted; we simply had people with better basic educations better able to grasp new concepts and operate (and more critically, build and maintain) more advanced, more complicated systems. Even though the Germans and Japanese and British had huge head starts, Americans rapidly took over in innovation. We also saw this after the war when America took the mantle as the most desirable higher education destination. It was only in the early sixties that social consciousness became part of formal education.
Nobody likes to talk about it, but a big part of our educational problems today are due to our diversity and social practices. The more homogeneous the population, the easier to educate. Today we are at record or near-record levels of first and second generation immigrants, with our national language often a very distant second. We also have a severely disadvantaged underclass of blacks, due to a combination of Jim Crow legacy, well-meaning social programs that devastated black families (and are similarly disadvantaging white and brown families, though more slowly), and social mores telling black and brown students that educational achievement is "acting white" and pointless anyway since society won't ever let them succeed except by government giving them jobs.
If we as a society could give black and Hispanic students the same motivation as Indian and Asian parents commonly give, this diversity would be a huge advantage since different cultural backgrounds often lead to new ways to see things and thus innovation. But right now, it's a millstone around our collective neck.