Elections are entering the homestretch before November’s election in better shape than earlier this year, boosted by gains among independent voters, improved views of President Biden and higher voting enthusiasm among Democrat-rights supporters, a Wall Street Journal poll shows.

Republicans have electoral fuel to tap into if they can keep the debate focused on the economy and what has been the highest inflation in four decades. Nearly two-thirds of registered voters say the economy isn’t good or poor—a larger share than in the last Journal survey, in March—and close to two-thirds say the pain of higher costs makes them more likely to cast a ballot.

Democrats hold a slight edge over Republicans, 47% to 44%, when voters are asked which party they would support in their congressional district if the election were held today, a lead that is within the poll’s margin of error of plus or minus 2.7 percentage points. Republicans had a five-point advantage in March.

The Democratic gains come from increased support among independents, women and younger voters. Black and Hispanic voters, who have traditionally favored Democrats heavily, are also more solidly supportive of the party than they were earlier this year.

Among political independents, typically the key to victory in close elections, more voters now favor a Democratic candidate for Congress than a Republican, 38% to 35%. In March, Republicans led among independents by 12 percentage points.

Before the Supreme Court’s late-June reversal of the landmark 1973 Roe v. Wade abortion ruling, the GOP had been more optimistic about its prospects, in part because the party that doesn’t control the White House typically makes midterm-election gains.

“Republicans were cruising, and Democrats were having a hard time,” said Republican pollster Tony Fabrizio, who conducted the survey along with Democrat John Anzalone. “It’s almost like the abortion issue came along and was kind of like a defibrillator to Democrats.”

At 60%, those who say abortion should be legal in all or most cases represent a majority of voters, up 5 percentage points from March. More than half of voters say the Supreme Court’s elimination of the federal constitutional right to an abortion has made them more likely to vote.

In a separate question, voters cited the court ruling as the single issue most likely to make them vote this November, ahead of four other issues tested, including inflation, border security, gun violence and the Federal Bureau of Investigation’s search of former President Donald Trump’s Florida home.

The court ruling was especially salient for white, suburban women, a group known for switching between the two parties in recent elections and who say they would back a Democratic candidate over a Republican, 52% to 40%.

Mr. Fabrizio said that, in the midst of the intensified feelings over abortion, the poll recorded a meaningful movement toward the Democratic Party among women in some groups, such as Hispanic voters and independents.

Control of Congress is up for grabs, and candidates are eager to sway voters heading into November. WSJ’s Joshua Jamerson explains how Republicans and Democrats are framing the debate around key issues such as the economy, abortion, gun violence, immigration and student-loan forgiveness . Photo illustration: Laura Kammermann

“Male independents did not really change,” said Mr. Fabrizio, who was Mr. Trump’s lead campaign pollster in 2016 and 2020. “Female independents, because of the abortion issue, changed their opinions and their votes.”

The poll’s congressional-preference question measures the national political climate, rather than opinion in any one state or House district. Still, the survey’s findings add to a growing body of evidence—from other public surveys, recent special-election results and analysis by nonpartisan forecasters—that suggests a more competitive fight for control of Congress than expected earlier this year.

Republicans need to pick up just a few seats to take over the House, which Democrats currently hold by a slim margin. Democrats control the 50-50 Senate because Vice President Kamala Harris can break ties.

Voters have turned even more pessimistic about the economy in recent months and they trust the Republican Party most to respond.

Some 62% say rising prices are creating major or minor financial strains on their budgets, up 4 percentage points from March. The 64% who say the economy is poor or not in good shape is up slightly from the prior Journal survey. Among independent voters , 69% rate the economy as poor or not so good.

Almost half of voters say the nation is in a recession, although one hasn’t officially been declared by the nonprofit group charged with making such determinations. More than three-quarters of Republicans say there is a recession, while only about a fifth of Democrats do.

Voters believe Republicans are better able to get inflation under control—by a 12-point margin—and by narrower margins think the GOP has the better economic plan and is most able to reduce the federal deficit.

Ask WSJ What Are Voters Thinking? Behind the Numbers with WSJ Pollsters

With two months until the midterm elections, we check in with WSJ pollsters Tony Fabrizio, a Republican, and John Anzalone, a Democrat, on what a new Wall Street Journal poll reveals about which issues are weighing most heavily on voters.

In another sign that the final two months of the campaign will play out in the midst of a deeply negative mood, more than two-thirds of votes—68%—think the nation is headed in the wrong direction, including 73% of independents. That is even gloomier than the 63% recorded among all voters in March.

Voters are noticing that gas prices are on the decline, with 63% saying they have gone down in their area in the past month or so. But Mr. Biden, who has taken a variety of actions to try to lower prices, only gets credit from 18% of voters for the drop.

Mr. Anzalone, the lead pollster for Mr. Biden’s 2020 presidential campaign, said he thinks the ruling, a summer of mass abortion shootings and additional information revealed about Mr. Trump through the congressional hearings on the Jan. 6, 2021, riot at the Capitol have all contributed to improved feelings about Democrats.

“On all of those issues, the Republicans were on the wrong side of public opinion,” he said.

Mr. Biden looks like less of a drag on his party’s candidates than earlier this year. His job approval has risen to 45%, up from 42% in March, while 54% disapprove of his performance.

Midterm elections have traditionally been viewed as a referendum on the current occupant of the White House, but Mr. Trump’s high profile in the nomination season and the search of his Florida home have kept him at the forefront of the American political conversation.

Favorable views of Mr. Trump declined slightly, and Mr. Biden leads him in a hypothetical rematch of the last presidential election, 50% to 44%. The two men had been tied in March. In the test match-up, Mr. Biden leads among independents, 46% to 38%.