We’re no huge fans of Sen. Kirsten Gillibrand, but she showed grace and good sense in dropping out of the 2020 presidential race as the writing on the wall became unmistakable.

Mayor Bill de Blasio — who’s still at it — not so much.

Even though he failed miserably at qualifying for next month’s debate, and indeed still crawls below 1% in the polls. Does he just hate his day job that much?

Another contrast: Gillibrand, when she first announced her bid, had at least a ghost of a chance, riding on her #MeToo credentials — not least for her leadership in forcing out Sen. Al Franken when his scandals broke. Indeed, she’s built a strong Senate record pushing the Democratic envelope on women’s issues.

And she showed a fair humility in bowing out, tweeting, “I am so proud of this team and all we’ve accomplished. But I think it’s important to know how you can best serve.”

De Blasio, on the other hand, has never had any chance on the national stage. His 2016 efforts to play progressive powerbroker were an embarrassing fiasco, and nothing he’s done in the years since was going to change that.

Heck, he’s political poison in his own state, once you leave the city. It’s no surprise he can’t draw crowds in Iowa, New Hampshire or anywhere else.

To be fair, Gillibrand has job security that the mayor can’t even dream of: Term limits will force him out (though not for two-plus years, sigh). She gets to “honor” her re-election year pledge to serve the remaining years of her Senate term, with a fair chance of holding onto that seat for decades.

And so de Blasio will plod on, turning City Hall favors into big-donor donations and a smattering of special-interest endorsements — returning to the city only to pretend he’s running an administration that’s plainly stuck in autopilot.

New Yorkers’ only consolation is that the autopilot may well be a stronger leader.