Charles Michel and Ursula von der Leyen put their signatures to the document in Brussels after the Queen gave royal assent to the legislation implementing the agreement on Thursday.
The European Parliament is now expected to vote to approve the agreement on Wednesday, paving the way for the UK to leave next Friday, January 31.
It will mark the start of an 11-month transition period, during which the UK will continue to follow EU rules, before the final break with Brussels at the end of the year.
Mr Johnson has said he wants to negotiate a comprehensive free trade deal with the EU by the end of the year.
Brexit 'finish line'
However, Mrs von der Leyen and other senior EU figures have warned the Government's stated intention to end the UK's alignment with EU regulations means it will be impossible to achieve within such a tight timetable.
The Prime Minister, however, remains upbeat, insisting Britain can now move forward after years of wrangling over Brexit.
"At times it felt like we would never cross the Brexit finish line, but we've done it," he said.
"Now we can put the rancour and division of the past three years behind us and focus on delivering a bright, exciting future."