The Commons voted by 438 to 20 at third reading to approve the one-page Bill enabling the election to be held on December 12.
Earlier, MPs voted by 315 to 295 to reject a Labour amendment for the proposed polling day to be moved to December 9 - three days earlier than ministers wanted.
The vote effectively clears the way for Parliament to be dissolved on November 6, paving the way for an election on December 12.
Addressing Tory MPs afterwards at Westminster, Mr Johnson said that he was prepared for a "tough" election fight in the weeks ahead.
Sunderland at Wembley: London pub chain Fuller’s heaps praise on Sunderland fans after Wembley weekend - after welcoming Peter Reid to one of its bars
Sunderland at Wembley: Fans raise 'virtual tip jar' fundraising target to thank staff at Covent Garden pub after smashing original total
19 Sunderland locations hosting Queen's Platinum Jubilee street parties
TRAFFIC UPDATE: Person rushed to hospital as A1(M) northbound traffic was held near Washington following a collision
Dates and spellings corrected on Sunderland Ed Sheeran gig signage after 'Kier' error
"I think it's time for the country to come together, get Brexit done and go forward," he said.
"It'll be a tough election and we are going to do the best we can."
The opposition parties had wanted to bring forward polling day to cut off any possibility Mr Johnson could make a fresh attempt to ram through his Brexit deal before Parliament is dissolved.
The bill will now go to the House of Lords, but after being approved by MPs it is unlikely that it will be held up by the unelected upper chamber.
The result means Mr Johnson finally has within his grasp the election he has been pushing for since September after three previous attempts - the most recent on Monday - failed.
Following the vote, Jeremy Corbyn said: "This election is a once-in-a-generation chance to transform our country and take on the vested interests holding people back."
Lib Dem leader Jo Swinson confirmed they would be campaigning on a platform to halt Britain's withdrawal from the EU.
"It is our best chance to elect a government to stop Brexit," she said.
"The Liberal Democrats are the strongest party of Remain and will be standing on a manifesto to stop Brexit by revoking Article 50."
The breakthrough came after Mr Corbyn finally bowed to intense pressure and agreed in principle to support an election.