WASHINGTON—The Trump administration raised the prospect of a global trade war by imposing tariffs on imports from the closest U.S. neighbors and allies, who swiftly pledged to retaliate with duties of their own.

President Donald Trump is pursuing an aggressive strategy to win economic concessions from neighbors and allies in an effort to cut the U.S. deficit in merchandise trade.

The...