“This is very much a referendum on the president,” Representative Tom Cole, an Oklahoma Republican, said of the November election. “If we had to fight this campaign on what we accomplished in Congress and on the state of the economy, I think we’d almost certainly keep our majority.”

Glen Bolger, a leading Republican pollster working on several top races this year, was even blunter: “People think the economy is doing well, but that’s not what they’re voting on — they’re voting on the chaos of the guy in the White House.”

Democrats still face challenges of their own, namely the unpopularity of Representative Nancy Pelosi, the House Democratic leader, and the party’s tilt left on issues like immigration, both of which could chill support from some otherwise persuadable voters. And the threat of a Democratic majority impeaching the president, which Mr. Trump is eager to raise, could rouse some of his supporters who otherwise may not show up in a year when he’s not on the ballot.

Even so, Mr. Bolger and many other prominent Republicans now believe they are likely to lose the House, where they have a 23-seat majority and as many as 60 seats are being fiercely contested by Democrats. The party is preparing to shift advertising money away from some of their most beleaguered incumbents toward a set of races in somewhat more favorable territory. In the narrowly divided Senate, both parties see eight or nine seats, most of them held by Democrats, on a knife’s edge.

And instead of attempting to highlight positive economic news like the 3.9 percent unemployment rate, Republicans have turned to a scorched-earth campaign against the Democrats in a bid to save their House majority and salvage their one-seat edge in the Senate.