Virginia Lt. Gov. Ralph Northam, the Democratic gubernatorial nominee, has emerged from this month’s chaos in Charlottesville with a solid lead over Republican nominee Ed Gillespie, though neither candidate has sealed the deal with voters.

Mr. Northam holds a 7-point lead, 43 percent to 36 percent, over Mr. Gillespie, according to a Roanoke College Poll released Tuesday. Some 17 percent of voters remain undecided.

But the numbers show just how far Virginia’s politics are tilting left for Mr. Northam, who has staked out one of the most liberal agendas of any Democratic gubernatorial candidate in the commonwealth’s history — including opposing Virginia’s decades-old right-to-work law.

Mr. Northam also backs a $15-an-hour minimum wage and wants to protect health and pension benefits won by labor unions, which support his gubernatorial bid.

He and Mr. Gillespie each emerged from heatedly contested primaries in June, and they have been circling each other in the weeks since.

The race got pointed earlier this month when neo-Nazis, white supremacists and “alt-right” adherents staged a rally in Charlottesville and clashed with counterprotesters.

In the wake of the clashes, a man seen marching with the white supremacists plowed a car into a crowd of counterprotesters, killing one woman and wounding 19 others, police said. The attack, which officials labeled domestic terrorism, shocked the country and sent both gubernatorial candidates scrambling to say it didn’t represent Virginia.

But President Trump’s handling of the tragedy has hamstrung Mr. Gillespie, who is trying to figure out how much to distance himself from his party’s national leader. Polling shows Mr. Gillespie is not out of the race, but he has struggled to find issues that resonate with voters, promising to tackle everything from gang violence to the state’s ban on commercial-grade fireworks.

Mr. Gillespie also defends the state’s right-to-work laws, and says Mr. Northam’s opposition to them breaks with tradition.

“While other states around the country are adopting right-to-work laws, including Kentucky and West Virginia on our borders recently, Ralph Northam wants to overturn Virginia‘s, breaking with longstanding bipartisan support for a critical cornerstone of our competitiveness,” Mr. Gillespie said. “I’ll protect our right-to-work laws, and make it easier to open and grow a business in Virginia, which has had a stagnant economy for six straight years now.”

Mr. Northam’s campaign insists the candidate’s opposition to the laws isn’t a major part of his bid.

“Right to work has been the law in Virginia for half a century, and it’s not going to change any time soon,” said Ofirah Yheskel, a spokeswoman for Mr. Northam. “Dr. Northam believes Virginia should focus on ways to help workers, such as improving project labor agreements, raising the minimum wage, workforce development.”

But his position is striking for a state that always has been relatively conservative, no matter which party has been in power. Even current Gov. Terry McAuliffe, a Democrat who is term-limited, said while running in 2013 that Virginia is a “great right-to-work state, and we should never change that.”

Gina Maglionico, communications director for the Virginia AFL-CIO, said the political landscape has changed in the commonwealth.

“I think we’re witnessing a changing tide in Virginia and last year’s overwhelming rejection of Amendment 1 is proof of that,” Ms. Maglionico said, referring to a referendum that would have enshrined the right-to-work laws in the state constitution.

Business groups, including the Virginia National Federation of Independent Business and the state chapter of the Associated Builders and Contractors, are supporting Mr. Gillespie, and say Mr. Northam is bending to the will of his party’s most liberal activists.

Supporters of right-to-work laws say workers should not be forced to join unions and encourage business investment in more jobs. Opponents, including the AFL-CIO, say they hurt workers by suppressing wages and diminishing working conditions.

Mr. Northam received more good news Tuesday, when billionaire climate change activist Tom Steyer’s NextGen America said it will invest $2 million on his campaign to get young people to the polls.

“Young people are overwhelmingly progressive, and they can make the difference this year in Virginia,” Mr. Steyer said. “Now more than ever, we need strong and principled state leadership to stand up to Donald Trump and the GOP’s divisive and hateful actions. Virginians deserve a leader like Ralph Northam who is committed to the issues young people care about: preventing climate disaster, promoting prosperity and equality, and protecting the fundamental rights of all Virginians.”