Iran vigorously denied a U.S. claim that it was behind attacks on four oil tankers in the Persian Gulf that set the Middle East on edge, as the Trump administration confronted mounting skepticism from allies abroad and Democrats at home.

Iran accused officials in the Trump administration of trying to pull it into a war with the U.S. and its regional allies.

Democratic...