The re-emergence of trade as a central political issue has scrambled traditional partisan alignments in ways that carry risks for both parties. Mr. Trump won the presidency partly by tapping into voters’ concerns about the impact of globalization on jobs and wages, particularly in the industrial Midwest.

But free trade still receives strong support among business groups, which have historically backed Republican candidates, and among big-dollar conservative political donors such as the Koch network. As recently as 2015, three-quarters of House Republicans voted for a measure meant to open trade even further — so-called “fast track” negotiating authority for President Barack Obama.

Reflecting those tensions, congressional Republican leaders have criticized Mr. Trump’s tariffs as potentially harmful to businesses and consumers while also praising the president’s broader goals on trade.

Representative Kevin Brady of Texas, the chairman of the Ways and Means Committee, opened a hearing on the effects of tariffs on the economy last week by saying the measures “curtail economic growth, discourage new investment, delay new hiring, and put American workers at a huge disadvantage to foreign competitors.”

But he added, “I remain committed to working with President Trump and the White House on strong, enforceable trade policies that will target bad actors and encourage economic growth here at home.”

Democrats face their own challenges on the issue. As Republicans have shifted away from supporting free-trade agreements, Democrats have embraced them: In the Times poll, 73 percent of Democrats said they thought free-trade agreements helped the United States, compared with 51 percent of Republicans. But union members, long a key source of mobilization and support for Democrats, retain the party’s longtime skepticism of free trade.

“It’s not an ideal issue for either party,” said Robert J. Blendon, who directs the Harvard Opinion Research Program at the Harvard School of Public Health. “It makes the issue slightly more complex because their voters’ views don’t correspond to their interest groups.”