WASHINGTON—President Biden has long held a Harry Houdini-like ability to escape political jeopardy. But even as he clings to his re-election bid , the president is now a severely wounded candidate leading a divided party.

Biden ended the most politically challenging two weeks of his presidency with a Friday rally in Detroit, where he heard chants of “Don’t you quit” and he later reassured the crowd, “I’m not going anywhere.”

It was the latest sign that the embattled president has fended off—for now—public pleas from fellow Democrats to end his re-election campaign in the aftermath of a disastrous debate. His performance in a high-profile news conference Thursday helped him calm some jittery Democrats.

But nearly 20 Democrats in the House and Senate have gone public with their concerns that the 81-year-old Biden can’t defeat Donald Trump and have urged him to stand down, taking a toll on the incumbent’s public image as he seeks re-election. That has also fueled concerns that his place at the top of the ticket will depress voter enthusiasm and hurt House and Senate candidates down-ballot .

Polls show Biden facing glaring weaknesses among Black, Latino and young voters and that his path to victory has narrowed. Some previous swing states look out of reach, and more states are coming onto the battleground map, giving Trump an opening in once reliably blue states such as Virginia, Minnesota, New Hampshire and New Mexico. The Biden campaign argues that the fundamentals of the race haven’t changed and briefed senators Thursday on their pathway to victory, most likely through the blue wall states of Michigan, Wisconsin and Pennsylvania.

An aggregate of polls by the nonpartisan Cook Political Report finds that a largely static race—with the candidates essentially tied at 46% each in national surveys—shifted after the June 27 debate to give Trump a 2.5-point lead, about 47% to 44.5%. Among Black voters, a crucial Democratic constituency, three straight Wall Street Journal polls this year have found Biden with 68% support to about 20% for Trump—a 48-point advantage that is far slimmer than the 83-point margin he won in 2020.

If those narrowed margins held through Election Day, “then Biden’s chances of winning Georgia, Pennsylvania, Michigan would be about the same chances that a human could survive on Mars for 24 hours,” said David Wasserman, a Cook Political Report analyst. “The lifeblood of the Democratic Party is winning enormous margins among Black voters, and voters of color as a whole, in these battleground states.”

Biden is the survivor of multiple near-political deaths. His first presidential campaign was derailed in 1987 by accusations of plagiarism, but he rebounded to become a leading voice in the Senate and eventually President Barack Obama ’s vice president. In 2020, he survived poor showings in Iowa and New Hampshire to seize the Democratic nomination, and he has relished overcoming the doubters with a series of legislative comebacks.

At every campaign appearance since the debate, Biden has been adamant that he is determined to run for re-election—at one point telling ABC News that only the “Lord almighty” could tell him to drop out of the race. But during Thursday’s news conference, he appeared to open the door slightly, telling a questioner that he would only reconsider if his staff told him “there is no way you can win,” adding, “No one’s saying that. No poll says that.”

Biden’s campaign has tried to tamp down dissent. On Monday Biden used the element of surprise, releasing a letter to congressional Democrats urging them to move on and calling into MSNBC’s “Morning Joe” to make his case for a second term. On Thursday, the president dispatched senior aides to brief skeptical Senate Democrats on the campaign’s pathway to victory. But many of the lawmakers made clear all of this remains a work in progress.

“I think he’ll make the right decision, the right decision that is right for him,” Sen. Joe Manchin of West Virginia told reporters after the meeting, even though Biden has already made his decision. “I think everyone will be talking over Friday, Saturday and by Sunday we should have some idea on what’s going on.”

Sen. Chris Murphy (D., Conn.) said Biden “can win, but he’s got to be able to go out and answer voters’ concerns, he’s got to be able to talk to voters directly over the next few days. I don’t think he’s done enough but I think he can.”

Biden officials believe if they maintain support among constituency groups such as the Congressional Black Caucus, the Congressional Hispanic Caucus and labor unions, he can survive. The president held calls with several Democratic coalition groups in the Congress during the week and appeared at an AFL-CIO event with labor leaders on Wednesday to drive home a message of resilience.

On Friday, longtime ally Rep. James Clyburn (D., S.C.) said in an interview with NBC’s “Today” that he was “riding with Biden no matter which direction he goes, no matter what method he takes.” But he also raised the possibility that Biden could change his mind before the Aug. 19 start of the Democratic National Convention.

A major task for the Biden campaign will be shifting the focus back to Trump—and making the election a choice rather than a referendum on Biden’s age. Campaign officials believe Trump’s selection of a running mate, which could come as soon as this weekend, and next week’s Republican National Convention in Milwaukee, will galvanize the Democratic base and help rally the party behind the president.

But getting to that point has been difficult—with each passing day producing more Democratic defections. Sen. Michael Bennet (D., Colo.), for example, warned that Trump could potentially beat Biden “by a landslide and take with him the Senate and the House,” while Rep. Adam Smith (D., Wash.) said if Biden continued his campaign, “it would be a mistake”—the kinds of comments that would easily fit into the script of Republican advertising.

The president has also faced generational pressure from younger members who would like to see Biden exit the stage and force Trump, who is 78, to own the albatross of age. On Friday, Rep. Brittany Pettersen (D., Colo.), a 42-year-old freshman from Denver’s suburbs, noted that her work on the 2008 Obama/Biden campaign inspired her to pursue public service. She expressed her “deep appreciation and love” for Biden, but urged him to “pass the torch” to give Democrats their best chance of beating Trump.

Biden’s struggles have taken their toll on fundraising , the lifeblood of American politics. While Biden’s campaign saw an influx in grassroots donations in the days after the debate, the flow of money has slowed since then, according to people familiar with the fundraising efforts, and the hope is that the Republican convention will jump-start fundraising next week.

“The donors are literally in open revolt,” said James Carville, a longtime Democratic strategist who has urged Biden to step aside. “The congressional leadership, everyone is trying to land the plane.”

Biden has only a handful of fundraising events in the coming weeks. The campaign will hold one in Austin, Texas, on Monday during a visit that will include a speech at the Lyndon Baines Johnson Presidential Library and an interview with NBC anchor Lester Holt. In late July, Biden is expected to travel to Northern and Southern California for fundraisers, along with an event in Denver.

Some recent polling has found that Biden remains competitive among voters nationwide, including an NPR/PBS News/Marist survey released Friday that shows Biden with 50% support and Trump at 48% among registered voters. But historically, a Democrat has had to lead by 3 points or 4 points in national surveys to win in the Electoral College, as big Democratic margins in California and other populous states throw the national vote and the count in battleground states out of alignment. In 2020, Biden won the national vote by about 4.5 percentage points but won the six main battleground states by only 1.6 points.

Many Democrats also worry that polling doesn’t yet reflect what could happen if Biden remains on the ticket: That Democratic voters, taking cues from party leaders who say Biden can’t win, become dispirited and decide it isn’t worthwhile to vote.

“There’s a real risk that a fatalism sets in on the part of base Democrats, that Democrats stay home,” Wasserman said. “And that sinks all boats.”

Write to Ken Thomas at ken.thomas@wsj.com and Aaron Zitner at aaron.zitner@wsj.com