Ineos had announced on Wednesday that it was shutting the plant in southwest Scotland, placing some 800 jobs at risk, after the workers rejected a survival plan that had included a pay freeze and changes to their pensions.
But the company said in a statement on Friday that the plant and its oil refinery — which together employ more than 3,000 permanent staff and contractors — would reopen immediately after a "dramatic u-turn" by Britain's biggest trade union, Unite.
Unite has agreed to a three-year pay freeze, a ban on strikes for the next three years and changes to the workers' pensions, Ineos said.
The company's chairman described the union's climbdown as a "victory for common sense".
"Unite advised employees to reject change and vote for closure," he said.
"Thank goodness people finally came to their senses."
Unite's Scottish secretary Pat Rafferty welcomed the deal.
Story continues below…
But it was "tinged with sadness" because "decent men and women are being asked to make sacrifices to hold on to their jobs", Rafferty said.
"Relief will ring right round the Grangemouth community, and across Scotland today," he said.
"Grangemouth is the powerhouse of the Scottish economy — it now has a fighting chance of upholding this crucial role into the future."
Government ministers and union officials had been locked in frantic talks with the company on Thursday in a bid to save Grangemouth.
Around 10,000 Scottish jobs are supported by the site, which supplies around 70 percent of the fuel used at Scottish filling stations.