Democratic businessman Terry McAuliffe and Republican Attorney General Ken Cuccinelli II face each other in the race for Virginia governor. Virginia Republicans are holding a convention this coming weekend in Richmond to choose their nominees for lieutenant governor and attorney general. (Associated Press/Getty Images)

Virginia Republicans will gather in Richmond this weekend at a convention dominated by conservatives even as fresh evidence shows them increasingly at odds with most voters in the commonwealth when it comes to key issues such as gay marriage, gun rights and immigration policy.

A new Washington Post poll shows stark challenges for both parties in the midst of a crucial gubernatorial race between Attorney General Ken Cuccinelli II (R) and businessman Terry McAuliffe (D). But the state’s apparent ideological shift has clearer consequences for Republicans, who must strike a balance between catering to their core supporters and broadening their appeal to remain relevant in a rapidly changing state.

The fact that Virginia Republicans are holding a convention to choose their nominees for lieutenant governor and attorney general — Cuccinelli has been named the party nominee for governor — is itself a victory for conservatives. Party moderates, led by Lt. Gov. Bill Bolling (R), wanted to hold a primary, contending that would better reflect the views of the whole party rather than just the most committed activists.

Bolling, who exited the governor’s race earlier this year and toyed with the idea of running as an independent, said Republicans can be conservative without alienating moderates and independents.

“The reality is that Virginia is a very purple state,” Bolling said. “We need to realize that there aren’t enough Republicans or Democrats in Virginia to elect anybody to anything. Elections in our state are determined by the [small part] of our electorate who consider themselves to be independent. We’ve got to figure out how to be a conservative party but do it in a mainstream way that appeals to these voters.”

Virginian’s changing views on gay marriage

The most visible shift has been in attitudes on gay marriage, the Post poll shows: 56 percent of Virginia voters now say it should be legal for gay couples to get married, up from 46 percent two years ago. That is a clear reversal from 2006, when 57 percent of voters backed an amendment to the state constitution outlawing same-sex marriage.

Republican voters are now more evenly split on the question — 40 percent say gay marriage should be legal, 47 percent say it should be illegal — after being widely opposed in surveys in 2011 and 2012. In 2006, 85 percent of Republican voters opted to ban gay marriage, according to exit polling at the time. In the new survey, 56 percent of political independents and 75 percent of Democrats support legalizing gay marriage.

Family Foundation of Virginia President Victoria Cobb said the shift is no reason for conservatives to change course.

“We’ve been hearing for years that people are moving this way or that on these different issues,” Cobb said. “The fact is that Virginia’s voters keep sending conservative, pro-family elected officials to Richmond. Until that changes significantly, these polls are meaningless.”

On guns, nearly nine out of 10 Virginians, including 82 percent of Republicans, say they would support a law requiring background checks on people buying firearms at gun shows or over the Internet. Most supporters of such a move back it “strongly.”

More generally, 59 percent of Virginians say it is possible to enact new gun-control laws without interfering with gun rights. Fewer, 34 percent, see new gun-control laws as always interfering with the right to own firearms. In terms of priorities now, 53 percent say enacting new laws to try to reduce gun violence is more important than protecting the right to own guns.

Philip Van Cleave, president of the Virginia Citizens Defense League, a gun rights group, said that “you can’t live your life by every little survey,” maintaining that the Virginia GOP is smart to remain strongly in favor of gun rights.

More Post coverage of the race for Virginia governor.

For evidence, he said, look at the House of Delegates, “with the vast majority of pro-gun Republicans in there, and see how the elections have gone for them.”

On abortion, public opinion appears to remain firmly on the side of having the procedure be legal in most or all cases. A majority of Virginians, 55 percent, in the new survey say abortion should be legal, while 42 percent say it should be illegal in most or all cases. The partisan divide on that question also remains clear: 69 percent of Democrats and 55 percent of independents say it should be legal, while 39 percent of Republicans say the same.

A similar split emerges on immigration. Most Republicans in the state oppose a “path to citizenship” for undocumented immigrants living in the United States, but a narrow majority of independents and a big majority of Democrats support the idea.

The Post poll has warning signs for the Democratic Party as well.

The party has lost significant ground among Virginians in recent years. A bare 51 percent majority of registered voters have a favorable impression of the state party, down from 64 percent in 2007 when Timothy M. Kaine (D) was governor. Still fewer, 46 percent, rate the Republican Party favorably, though the gap between the parties has narrowed considerably.

Democrats’ effort to rally supporters around social issues and against Cuccinelli highlights a challenge for the party compared with 2012, when voters were enthusiastic about supporting President Obama at the top of the ticket. In this year’s gubernatorial race, by contrast, two-thirds of Democratic-leaning voters know little or nothing about McAuliffe and only 16 percent of his supporters are “very enthusiastic” about his candidacy.

Even if the state is decidedly in the center or to the left on some social issues, Virginians are wary of overreach from Washington, a key GOP theme. Some 56 percent of adults in the state say the federal government is “trying to do too many things that should be left to individuals and private businesses,” while 38 percent say the government should do more to solve the country’s biggest problems.

Former lieutenant governor John H. Hager, who is attending the GOP convention as a delegate, said conservatives do not necessarily need to change their core values.

“We have to stand on our principles and believe in what we believe in,” Hager said. “I think it means . . . changing how those beliefs are communicated. Sell our message. We tend to concentrate on 10 percent of the issues and forget 90 percent because it doesn’t make for good media coverage.”

The Washington Post poll was conducted by telephone April 29 to May 2 among a random sample of 1,000 adults in Virginia, including 887 registered voters and users of both conventional and cellular phones. The results among registered voters have a margin of sampling error of plus or minus four percentage points.

Clement is a pollster with Capital Insight, Washington Post Media’s independent polling group. Jon Cohen, director of polling for Capital Insight, contributed to this report. Capital Insight pollster Peyton M. Craighill also contributed.