On Wall Street, the rising dollar has been one of the most visible signals of growing optimism in the U.S. economy. For many other countries, it spells trouble.

Most analysts expect the U.S. currency to strengthen in 2017, extending a gain that has boosted the value of the dollar by more than one-third since the U.S. credit downgrade in 2011.

That...