The ship and a helicopter with marine commandos made their way toward the ship, where they saw two people attempting to board it, the navy said in a statement.
"The visibility being low, it was possible that the pirates may not have sighted the warship and the helicopter. The helicopter had to, therefore, resort to firing warning shots to deter the pirates from boarding the ship," the statement said.
The navy said the attackers fell into the water, but their fate was unclear. No injuries were reported among the crews of either ship. The statement gave no further information about the attackers.
The Gulf of Aden is one of the world's most important shipping lanes, crossed by 20,000 ships a year, and a prime target for Somali pirates.
The Indian warship was in the area escorting several merchant ships as part of anti-piracy surveillance in the area.
Last November, India's navy drew criticism after sinking a Thai fishing trawler that had been commandeered hours earlier by pirates. The navy defended its action, saying it had fired in self-defense.
NEW YORK AND TRI-STATE AREA NEWS
SEND TIP OR PHOTO || REPORT TYPO || GET WIDGET
EYEWITNESS TWITTER || FIND US ON FACEBOOK