One of the crew members of the boat, “Remas,” received a bullet wound, and the other suffered a concussion, and both were transferred to a nearby hospital, the Navy said in a statement.
Owned by Italian offshore contractor Micoperi, the boat is a supply vessel for Mexico’s oil industry.
It had a crew of about 35 when the attack occurred off the city of Ciudad del Carmen in the state of Campeche, according to two people familiar with the matter and local media reports.
About eight armed pirates arrived in two small ships and boarded the vessel, robbing the crew, the reports said.
Micoperi and the Italian embassy in Mexico did not immediately respond to requests for comment.
Mexican state oil firm Pemex has said robbery is increasingly affecting its oil infrastructure. Sophisticated equipment has been stolen and resold, and crews robbed.
Most registered attacks have been in the southern rim of the Gulf of Mexico, where dozens of oil platforms produce thousands of barrels of crude per day.