FREEPORT, Pa.—The rising dollar is putting U.S. manufacturers through the equivalent of a new year’s fitness regime, causing pain for now but also promising long-term gains in efficiency.

After more than a decade of weakness, the dollar began surging in mid-2014 against the euro and many other currencies. That is making U.S.-made products pricier in other countries and imports cheaper in the U.S.—a combination that is likely to expand the already gaping U.S. trade deficit.

...