ISTANBUL—President Recep Tayyip Erdogan said Tuesday that Turkey would boycott U.S. electronic goods, the latest move in escalating jousting between Ankara and Washington that has sent the Turkish lira to record lows.

The boycott, which Mr. Erdogan announced in a speech celebrating the 17th anniversary of his ruling party, is part of a wider campaign Turkey has launched to retaliate against U.S. sanctions, and which has spread to places from the advertising market to beauty parlors.