The leak from the pipeline owned by Star Petroleum Refining Public Company Limited (SPRC) started late on Tuesday and was brought under control a day later after spilling an estimated 50,000 litres (13,209 gallons) of oil into the ocean 20 km (12 miles) from the country's industrialised eastern seaboard.
Some of the oil reached the shoreline at Mae Ramphueng beach in Rayong province late on Friday after spreading over 47 sq km (18 sq miles) of sea in the gulf.
The navy is working with SPRC to contain the leak and said the main oil mass was still offshore with only a small amount washing up on at least two spots along the 12-km-long beach.
About 150 SPRC workers and 200 navy personnel had been deployed to clean up the beach and oil boom barriers had been set up, the navy said.
Twelve navy ships and three civilian ships along with a number of aircraft were also working to contain the spill at sea with booms and dispersant spray.
"We and the company are still working at sea to reduce the amount of oil by cornering the spill and sucking up the oil and spraying dispersant," Rear Admiral Artorn Charapinyo, deputy commander of the first Naval Area command, told reporters.
(Reporting by Panu Wongcha-um; Editing by Stephen Coates)