The Comprehensive Economic and Trade Agreement (CETA), which backers say will boost bilateral trade by 20 percent, appeared to be in trouble after Belgium's French-speaking Wallonia region raised a series of late objections.
All 28 EU governments back CETA but Belgium's central government had been prevented from giving consent because it needed approval from sub-federal authorities.
After Belgian politicians agreed to an addendum on Thursday to allay Wallonia's concerns, the regional parliament voted on Friday to back the deal.
The parliaments of Brussels and the Dutch-speaking community approved the deal a few hours later.
Wallonia's Socialist premier, Paul Magnette, who had become a hero to protesters across Europe, said the Belgian negotiations produced a deal he could live with.
"The amended and corrected CETA is more just than the old CETA. It offers more guarantees and it is what I will defend," Magnette said.
The addendum addresses fears that a system to protect foreign investors could strengthen multinationals. It also provides a safeguard clause for farmers.
"With this saga, which I must say made some noise, everybody in Europe knows the Walloon parliament exists," Magnette said.
The agreement could partially enter force next year, some eight years after talks began, as long as the European Parliament also backs it. It would bring in tariff reductions before national and regional parliaments complete ratification.
The opposition to CETA is part of a growing backlash in the West against globalisation, with the fiercest protests against a proposed EU-U.S. deal best known by its initials, TTIP.
Protesters say TTIP and CETA would strengthen multinationals and degrade food, environmental and labor standards.
Magnette said on Friday that "TTIP is dead and buried".
The Belgian dispute over CETA reflects a split in the country between a richer, Dutch-speaking north and a largely French-speaking south that has struggled to cope with the decline of its coal and steel industries.
The federal government has just one party from the south, Prime Minister Charles Michel's MR liberals, the Socialists' arch-enemies.
But not everyone in Wallonia agreed with Magnette.
"It is clear that the text of CETA stays the same: the DNA of CETA is one of deregulation and it puts nations in competition at an unprecedented level," said Frederic Gillot of PTB-GO, a hard-left party that is winning voters from the Socialists.