HARTFORD — In races for governor across the nation, the specter of President Trump looms as a beacon of divisiveness, and Connecticut is no exception.

Ned Lamont, the Democratic candidate for governor, has tried to tie the Republican candidate, Bob Stefanowski, to Mr. Trump during debates, commercials and campaign mailers, including one that suggested that Mr. Stefanowski was guest starring in an episode of “The Apprentice” entitled, “How to run Connecticut into the ground.”

In a state that has voted Democrat in the last seven presidential elections, including 2016, when Hillary Clinton drew 54.6 percent of the vote to Mr. Trump’s 40.9 percent, Mr. Lamont’s strategy would seem sound.

And yet Connecticut is one of only two states, along with Oregon, where Democrats are thought to be at risk of losing the governor’s seat. A recent poll by Sacred Heart University and the Hearst Connecticut Media Group showed Mr. Lamont leading Mr. Stefanowski, 39.5 percent to 36.1 percent, a lead that falls inside the poll’s margin of error. A third-party candidate, Oz Griebel, drew 8.4 percent of survey respondents.