With just seven weeks of campaigning left before the November election, President Obama holds a clear lead over Mitt Romney in Virginia, buoyed by growing optimism about the state of the country and fueled by a big gender gap working in his favor, according to a new Washington Post poll.

Obama leads his Republican rival 52 percent to 44 percent among likely voters. Among all registered voters, the president leads 50 percent to 43 percent, a margin identical to that recorded in a survey in early May. That indicates that Romney has made up little ground during four months of intense advertising and campaign visits.

Virginia is critical to Romney’s hopes of winning the White House. Without the commonwealth, his path to 270 electoral votes would be significantly more difficult. Along with Ohio and Florida, Virginia will be one of the most fiercely contested battleground states, reflecting the importance that both campaigns have put on its 13 electoral votes.

A separate poll by Quinnipiac University, made public Wednesday, shows Obama with a smaller, four-point lead over Romney in Virginia. Obama’s lead in that poll also is unchanged from a month ago. The poll by Quinnipiac said the candidates are neck-and-neck in Colorado, another swing state, but put Obama up by six points in Wisconsin, also a key battleground.

“All the bounces seem to be over as the candidates buckle down for a seven-week down-to-the-wire race to the finish,” Peter A. Brown, assistant director of the Quinnipiac University Polling Institute, said in a written statement.

Virginia rode out the recession far better than many other states, in part because of a huge defense sector, and that appears to be working in the president’s favor. A majority of Virginia voters surveyed in the Post poll still say the country is on the wrong track. But the percentage who say it is moving in the right direction has increased nine points, to 41 percent, since May.

Obama also receives more positive job-performance ratings in Virginia than he does nationally, the Post poll found. A majority of voters — 53 percent — say they approve of how he is doing overall, and 51 percent give him positive marks for his handling of the economy. In the case of the economy, his marks in Virginia are significantly higher than those he received in the most recent Washington Post-ABC News national poll.

Romney has campaigned by arguing that his business background better qualifies him to turn around an economy with a national unemployment rate above 8 percent. But when asked whom they trust more to handle the country’s economic problems, voters divided almost evenly, with 47 percent saying the president and 45 percent choosing Romney.

But by 54 percent to 37 percent, Virginia voters say Obama better understands the economic problems that Americans are facing. The survey was completed before a video was leaked that showed Romney saying at a fundraising event that 47 percent of Americans consider themselves “victims” and are dependent on the government.

With looming defense cuts, Virginia’s economy could take a hit, and economic problems generally remain a vulnerability for the president, both in the state and nationally.

Voters offered contrasting views in follow-up interviews.

“I think he’s actually making some progress, albeit slow, in terms of . . . moving our economy forward,” Henry F. Robinson, 64, of Reston, a recruiting manager for government contractors, said of Obama. “I think he is protective and is concerned about the middle class, and I think that’s where the focus needs to be.”

But Joe Bergin, 38, a defense contractor from Ashburn, said he was leaning toward the GOP ticket for the first time in his life. “Obama, he’s not really favoring government contractors right now,” Bergin said. “It definitely drives me in the direction of Romney right now. . . . I’m primarily concerned about my livelihood.”

Even some Obama supporters would like him to try something new.

“I think he needs to have a stronger economic program in the second term and he may need a different set of advisers, but I think he has the right idea,” said Robert E. Brogan, 61, of Falls Church, a safety analyst for the U.S. Department of Transportation. “He needs some cooperation from the other side in terms of spending cuts and tax increases.”

The Post poll highlights the fact that the president is benefiting from strong support among women. Obama leads among female voters 58 percent to 39 percent; men divide 50 percent for Romney and 44 percent for Obama. Compared with 2008 exit polls, Obama is running somewhat worse among men this year but is doing better among women, who made up a majority of the Virginia electorate four years ago and are likely to do so again this year.

Obama’s campaign has advertised heavily in parts of Virginia on women’s issues, and the president holds a 22-point advantage in the new survey on the question of who is more trusted on those issues.

Beyond his eight-point lead in the head-to-head matchup, Obama holds clear to overwhelming advantages over Romney on six of 10 issues tested in the new poll. Romney has a significant advantage on none.

The president has double-digit advantages over his Republican rival on issues including the future of Medicare and Medicaid as well as advancing the interests of the middle class. Obama and Romney are about even when voters were asked who would do a better job of handling taxes and the budget deficit.

Obama also leads Romney on social issues such as abortion and same-sex marriage, although overall those issues rank well below the economy and health care for most Virginia voters.

“I don’t have any issues with gay marriage or pro-choice. Who you fall in love with is not somebody else’s business,” said Tom McIntosh, 40, a budget analyst from Springfield and a Republican. He voted for Obama last time but intends to vote for Romney because of tax policy. “Those [social] issues are not a big topic for me,” he said.

Obama’s voters also appear more passionate in their support than do Romney’s. About nine in 10 Obama supporters and more than eight in 10 Romney backers said they are enthusiastic. But 61 percent of Obama voters said they are “very enthusiastic,” compared with 45 percent of Romney voters.

Virginians will have other presidential choices. Former congressman Virgil Goode Jr. has qualified for the ballot in the state, as have libertarian candidate Gary Johnson and Green Party nominee Jill Stein. But those third-party options did not change Obama’s margin against Romney and did not register much support in the poll. Johnson is at 4 percent, Goode at 2 percent and Stein at 1 percent when they were explicitly included in the question.

Republicans have openly fretted that Goode, a conservative who served in Congress as a Democrat, an independent and then a Republican before losing his southwest Virginia seat in 2008, could play the role of spoiler by drawing votes from Romney.

Since the race became a two-man contest in April, the campaigns and outside groups have spent more than $60 million on more than 11,000 ads in Virginia. That has given the commonwealth some of the most highly saturated TV markets in the nation. The candidates and their wives also have visited Virginia more than 40 times since June, making it the third-most-visited state, behind Ohio and Florida.

The poll was conducted by telephone Sept. 12-16 among a random sample of 1,104 adults in Virginia. Interviews were conducted on conventional and cellular telephones and carried out in English and Spanish. The margin of error for samples of registered and likely voters is plus or minus four percentage points.

Errin Haines, Ben Pershing, Peyton M. Craighill and Scott Clement contributed to this report.