The official, speaking on the condition of anonymity, said the USS Thunderbolt fired the warning shots after the Iranian vessel ignored radio calls and the ship's whistle. The Thunderbolt was being accompanied by several U.S. Coast Guard vessels.
The Iranian vessel appeared to be from Iran's Islamic Revolutionary Guard Corps, the official added.
Years of mutual animosity had eased when Washington lifted sanctions on Tehran last year as part of a deal to curb Iran's nuclear ambitions. But serious differences remain over Iran's ballistic missile program and conflicts in Syria and Iraq.
U.S. President Donald Trump's administration recently declared that Iran was complying with its nuclear agreement with world powers, but warned that Tehran was not following the spirit of the accord and that Washington would look for ways to strengthen it.
During the presidential campaign last September, Trump vowed that any Iranian vessels that harasses the U.S. Navy in the Gulf would be "shot out of the water."
Similar incidents happen occasionally, the last in January when a U.S. Navy destroyer fired three warning shots at four Iranian fast-attack vessels near the Strait of Hormuz after they closed in at high speed and disregarded repeated requests to slow down.