Confidential polling data shows Hillary Clinton could lose the presidential election in heavily Democratic New York to Donald Trump as the GOP front-runner’s support grows to the point of being “surprisingly strong,” The Post has learned.

The poll results, from Democratic and Republican legislative races, have surprised many leading Dems, virtually all of whom have endorsed Clinton, while confounding and energizing GOP leaders, many of whom until recently have been opposed to Trump.

“There are some Democrats who think that Hillary can be taken if Trump mounts a strong campaign,’’ one of the state’s most prominent Democrats said.

Most of the polling didn’t address the possibility that former Mayor Michael Bloomberg would run as an independent, but some of it did — and found the former mayor took “significant’’ votes away from Clinton in heavily Democratic New York City and the surrounding suburbs, a source familiar with the data said.

The new polls, a second source said, showed Trump’s support, even without Bloomberg in the race, was “surprisingly strong’’ in Westchester and on Long Island, the key suburbs often viewed as crucial swing bellwethers on how statewide elections will turn out.

The polls found that Clinton often had higher negative ratings with voters than did the more controversial Trump, whose inflammatory pronouncements have often angered and even horrified many of his fellow Republicans.

“In the suburbs and upstate, Trump has a net positive while Hillary is a net negative,” one longtime Republican operative contended. “She’s more of a liability than many Democrats realized.”

Some of the polls also found a greater degree of intensity among Trump’s potential voters than among Clinton’s, a finding that mirrors the stronger GOP turnouts that have been registered in the presidential primaries.

A publicly disclosed Siena College poll of Long Island voters last week found Trump narrowly beating Clinton among Long Island voters, 41 percent to 38 percent, while he was crushing his two nearest GOP primary opponents, Marco Rubio and John Kasich, by 37 percentage points each.