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 US 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.
US 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 US Navy in the Gulf would be "shot out of the water."
Similar incidents happen occasionally, the last in January when a US 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.