Cocky Democrats gathering in Philadelphia this week are proclaiming that Hillary Clinton will easily defeat Donald Trump in November — but one of their own best-known strategists is ringing the warning bell.

“I think he can win, and I’m not daffy,’’ veteran Democratic consultant Hank Sheinkopf, who has worked for dozens of top Democrats including former President Bill Clinton and Gov. Cuomo, told The Post.

“Democrats are doing what they always do, telling themselves a story, and the story is that Donald Trump can’t win, and that’s just not true,’’ Shein­kopf said.

“What has been happening, and the Democrats haven’t been paying enough attention to this, is that the Republican Party of Donald Trump has become the ‘action party’ in the country and the Democratic Party of Hillary Clinton and President Obama has become the ‘passive party.’ ”

“Trump is creating an extraordinary combination of right and left in one place. He’s taking on the elites in both parties, giving all those having some grievances a place to go, and how the Democrats get out of that, I don’t know,’’ he said.

Sheinkopf praised Trump’s “brilliant’’ strategy at the end of the Republican convention of delivering a “populist message that appealed to all those pissed-off average guys,’’ while reaching out to gays and lesbians — whom he promised, to cheers, to defend against attacks — in a move that “reduced the fear of the religious right that many non-Republicans have.”

“The Democrats have convinced themselves that Trump can’t win, but I don’t think they fully realize what’s happening out there”

“The gay thing was very important in terms of adding a libertarian streak to the Republicans’ appeal, basically saying, ‘I don’t care who you are — we’ve got to do this for America. I work for you,’ ’’ said Sheinkopf.

A second prominent Democrat who has worked closely with Mrs. Clinton and has strong ties to Cuomo, other top state Democrats, and to Trump himself, said he, too, is convinced that many Democrats misjudge the Trump threat.

“The Democrats have convinced themselves that Trump can’t win, but I don’t think they fully realize what’s happening out there,’’ he told The Post.

“Donald Trump is an extraordinary person who is difficult to define and therefore difficult to figure out how to deal with,” he said.

“No one, for instance, expected him to have that LGBT reference in his speech, and that’s clearly a way to redefine the Republican Party in a way that will make it appealing to some Democrats,’’ he said.

“I’m seeing a guy in Trump who I thought was playing at running for president a year ago but who now has become comfortable at doing it and is really beginning to plot, and that’s nothing to underestimate.’’

Two top questions for New York Democrats arriving in Philadelphia: (1) How good of a speaker’s role will Clinton and her campaign give Cuomo this week? (2) Will Cuomo give Mayor de Blasio a significant speaking role during one of the state delegation’s breakfasts?

A prominent state Democrat, noting that L.A. Mayor Eric Garcetti was expected to speak at the New York breakfast, asked, “So will Cuomo, who controls the breakfasts, let de Blasio speak?”