The fire was mostly contained by Friday late afternoon, port officials said, while recovery efforts were ongoing for the charred bodies of victims of the blaze in the southeastern port city on the Gulf of Guinea.
Ports Minister Amuyaw Akumfi said in a statement broadcast over national television that nine people were confirmed dead, including four whose bodies had been recovered.
The unofficial toll hit 18, including 15 of 17 crew members of the MV Polaris docked in the shipyard for minor repairs, according to witness Frimpong Manso, a local radio journalist.
The crew aboard the Greek-flagged ship comprised one Russian, one Greek and one Guinean national, as well as 14 Ghanaians. It was not yet known who had survived.
"All 15 people on board burned to death and it appears that two were able to swim to safety," Manso said.
"The Ghanaian navy has begun recovery efforts."
Ben Owusu-Mensah, director general of the Ghana Port and Harbour Authority, said that the fire had been raging since 9am (0900 GMT), taxing the resources of 80 firefighters called to the scene.
A port official said that preliminary investigations suggested that the explosion began on the ship, where a dock worker was doing some welding repairs.
A police officer controlling the accident site said on condition of anonymity that oil had leaked from the pipeline into the sea and the sparks from the welding ignited the oil spill, causing the blaze.
Once a distant second to Abidjan in Ivory Coast, Ghana's Tema port has become a major conduit of goods for much of west Africa due to the prevailing tensions in its western neighbour.