Republicans may have their best chance of winning a Massachusetts congressional seat in nearly two decades with Richard R. Tisei pulling six percentage points ahead of Representative John F. Tierney in a new Boston Globe poll.

Tisei, a former state senator from Wakefield, leads Tierney, a Salem Democrat, 37 percent to 31 percent among likely voters, with 30 percent undecided.

The high percentage of undecided voters reflects the electorate’s lack of knowledge of Tisei as well as Tierney’s relative unpopularity, even among members of his own party, said Andrew E. Smith, the director of the University of New Hampshire Survey Center, which conducted the poll.

“Tierney is vulnerable, very vulnerable,” Smith said. “He’s in really rough shape to pull this out, by historical standards.”

The findings suggest that unflattering attention from the illegal gambling ring that was run by Tierney’s brothers-in-law has taken a serious toll on the congressman’s reelection campaign, Smith said.

Tierney’s vulnerabilities, combined with Tisei’s relatively moderate stances on many issues, have made the Sixth Congressional District race one of the most competitive in Massachusetts and the most closely watched nationally. If elected, Tisei would be the first openly gay Republican congressman to disclose his sexual orientation before being elected.

National Republicans are targeting Tierney with attack ads that demand he “man up and tell the truth — the whole truth” about the gambling operation. Tierney’s wife, Patrice, spent a month in federal prison last year after pleading guilty to “willful blindness” while managing a bank account for one of her brothers involved in the gambling ring, and for helping that brother file false tax returns. John Tierney has not been accused of any wrongdoing, and has said he had no knowledge of any illegal activity. But the poll indicates his image has been tarnished. In 2010, Tierney won handily with 57 percent of the vote.

In the new Globe survey, just 32 percent of likely voters said they view Tierney favorably, compared with 43 percent who viewed him unfavorably. About 17 percent said they did not know enough about him, despite his 16 years in Congress.

Even among Democratic voters, just a bare majority — 51 percent — said they view Tierney favorably, while 26 percent viewed him unfavorably.

The live telephone survey of 371 likely voters in the district, which includes much of Northeastern Massachusetts, was conducted from Sept. 21 to Sept. 27 and has a margin of error of plus or minus 5.1 percentage points.

The poll suggests Tierney’s best hope may be to capitalize on Tisei’s relative anonymity to persuade voters that the Republican is an unacceptable alternative. While 33 percent of voters said they view Tisei favorably and 22 percent said they view him unfavorably, 37 percent said they do not know enough about him.

Tisei “hasn’t been defined with the electorate,” Smith said. “If you’ve got a negative image among voters, what you have to do is pull that person down to your level.”

Tierney has launched ads that link Tisei to Rush Limbaugh, Sarah Palin, and Newt Gingrich — all polarizing figures in deep-blue Massachusetts. Tierney has also argued that Tisei would empower Republican leaders in the House who are far too conservative for the district.

But even as he embarks on that effort, Tierney has yet to consolidate support among members of his own party, a first step in any reelection campaign.

Only 54 percent of Democrats said they support Tierney, compared with 70 percent of Republicans who said they support Tisei. Independents favor Tisei 39 percent to 23 percent.

Agnes Leavey, a 55-year-old homemaker from Lynn, exemplifies Tierney’s challenge. Leavey, a Democrat, said she is voting for Barack Obama for president and Elizabeth Warren for Senate but is not sure whom to support for Congress.

“The problem with [Tierney’s] wife and all that — I’d like to find out more information about it,” said Leavey, who responded to the poll and agreed to a follow-up interview. “Naturally, I would lean more toward the Democratic Party but, on the other hand, if I heard he did something that was wrong, I wouldn’t vote for him.”

James Seaton, a 63-year-old unenrolled voter from Bedford who responded to the poll, said he supports Warren for Senate but also has reservations about voting for Tierney.

“Tierney is not charged with anything, but things smell a little off,” said Seaton, who is unemployed and had been working in the electronics industry.

Seaton said he is also concerned that Tisei “seems a bit more conservative than I’d like.” For example, Seaton said, he believes tax increases could help solve the federal budget crisis. Tisei has declined to sign a no-new-taxes pledge but opposes Democratic plans to raise taxes on the wealthy by allowing the Bush tax cuts to expire for those earning more than $250,000 a year.

A small gender gap in the race favors Tisei. Men said they support Tisei 45 percent to 26 percent while women support Tierney by a narrower margin, 36 percent to 29 percent.

Daniel Fishman, a little-known Libertarian, is also in the race. Though he was not included in the poll, 2 percent of respondents said they would vote for a candidate other than Tierney or Tisei.