There are two ways to close the school achievement gap: lift up struggling students or push down those who are succeeding. Having failed at the former, Mayor Bill de Blasio seems intent on pursuing the latter.

This week, de Blasio’s “School Diversity Advisory Group” recommended that the New York City Department of Education scrap Gifted & Talented programming. This idea is both jaw-dropping and entirely unsurprising.

At a basic level, it’s the logical next step in de Blasio’s escalating war against excellence: Oppose the most successful charter schools. Oppose all charter schools. Oppose a test for advanced opportunities. Oppose all advanced opportunities.

But at a deeper level, this is an inexorable extension of de Blasio’s ideology. De Blasio, Schools Chancellor Richard Carranza and their privileged fellow travelers define their politics as in opposition to “white supremacy.”

But they do not define “white supremacy” as a belief in inherent racial superiority. As their recent staff training made clear, they define it as a belief in “objectivity,” an aspiration toward “perfectionism,” a “sense of urgency” and “worship of the written word.”

If you sincerely believe that habits and traits that lead to success constitute “white supremacy,” and you oppose “white supremacy,” then you simply must inhibit opportunities for children to develop those qualities by dismantling advanced coursework.

That’s not, of course, the stated rationale behind the recommendation. Rather, the motivation presented is integration.

But even de Blasio’s advisers appear to understand that their proposal will not advance that cause. In the face of an education system that implicitly defines excellence as a racist social construct, middle-class parents will decamp in droves for the suburbs or stretch their pocketbooks to pay for private school.

De Blasio now faces a high-stakes test of his higher-order reasoning skills. His ideology may not afford him the tools to think “critically” about the choices before him, but his political instinct must tell him that it would be folly to fully implement this proposal.

If he polled parents, he’d surely find that only a vanishing minority of parents — white, Asian, black or Hispanic — would support this policy. The only true constituency is his small cadre of cultural Marxist advisers.

His best way forward: accept one modest proposal, reject the rest, then spout social justice rhetoric to his heart’s content.

Stop sorting 4-year-olds with a standardized test. De Blasio’s panel is surely correct that differences in performance on these tests stem too much from helicopter-parent-sponsored test prep, and too little from genuine cognitive ability.

This isn’t just bad for disadvantaged kids but for privileged kids, too. Prepping a 4-year-old for a standardized test is a great way to produce what David Brooks termed “achieveatrons.” But it’s an awful way to form a balanced young boy or girl.

Rather than engender outrage from upper-class parents, this move would more likely be met with welcome relief. All parents, after all, should want the pre-standardized-test phase of childhood to last more than three years.

As students make their way through their elementary years, schools should have the flexibility to engage them through special classes or by providing advanced tutoring. One size should not fit all. De Blasio’s stated commitment to “diversity” should extend to allowing different schools to identify and serve gifted students in different ways.

As he eliminates early test-based tracking, de Blasio could talk a mean game about “equity” and “social justice.”

He could say he’s undoing an inhumane excess of the Bloomberg-era education-reform agenda. He could say he’s striking a powerful blow against intergenerational privilege. He could say that he’s helping to restore the innocence of childhood. And he’d have the rare virtue of being right about it all.

Will de Blasio display sufficient innate intelligence to pass this test? Or will his performance prove solely a reflection of his privileged peer group?

Fortunately, he can take all the time he wants to study. And hopefully, he won’t fail a generation of bright young minds.

Max Eden is a senior fellow at the Manhattan Institute.