MEPs in Brussels gave their consent to the deal by 660 votes to five, with 32 abstentions.
The result, announced on Wednesday after a vote late on Tuesday, was also welcomed by European Commission president Ursula von der Leyen.
Ms von der Leyen said the Trade and Co-operation Agreement "marks the foundation of a strong and close partnership with the UK".
But in an acknowledgement of EU concerns about the Prime Minister's approach to deals with Brussels, she warned that "faithful implementation is essential".
The UK and EU are at odds over the way the earlier Brexit divorce deal is being implemented in Northern Ireland.
There are a few remaining formalities which need to be completed before the deal struck by Mr Johnson and the EU on Christmas Eve last year is finally ratified.
The Prime Minister said: "This week is the final step in a long journey, providing stability to our new relationship with the EU as vital trading partners, close allies and sovereign equals.
"Now is the time to look forward to the future and to building a more global Britain."
The European parliament's Brexit co-ordinator Guy Verhofstadt described the deal as "a failure for both sides, but better than nothing".
Brexit minister Lord Frost said the vote was an "important moment".
"Today's vote brings certainty and allows us to focus on the future," Lord Frost said.
"There will be much for us and the EU to work on together through the new partnership council and we are committed to working to find solutions that work for both of us.
"We will always aim to act in that positive spirit but we will also always stand up for our interests when we must – as a sovereign country in full control of our own destiny."
European Council president Charles Michel said the approval of the deal "marks a major step forward" in UK-EU relations and "opens a new era".
He said Brussels will work constructively with the UK as an "important friend and partner".