The PM won 59% of the vote, meaning he is now immune from a Conservative leadership challenge for a year.
In all, 211 Tory MPs voted they had confidence in the PM's leadership while 148 voted against him.
Mr Johnson described his confidence vote win as "decisive".
Striking an upbeat tone, he said it was a "very good", "convincing" result and "an opportunity to put behind us all the stuff that the media goes on about".
The result sees the prime minister remain in office, but critics said the scale of the rebellion against him showed his authority had been weakened, with some calling on him to resign.
The vote share in support of Mr Johnson was lower than the 63% received by former Prime Minister Theresa May when she won a party confidence vote in 2018, before resigning six months later over a Brexit deadlock.
Labour leader Sir Keir Starmer said a "divided" Conservative Party was "propping up" Mr Johnson after he survived the confidence vote.
And Liberal Democrat leader Sir Ed Davey said while Mr Johnson had clung on to power, "his reputation is in tatters and his authority is now totally shot".
But Downing Street said the result "renews the PM's mandate" and allows the government to "focus relentlessly on the issues that concern our voters".
Tory MP and Welsh Secretary Simon Hart told the BBC the prime minister "has lots to prove" but insisted the result "was pretty decisive".
Mr Johnson, who became prime minister in 2019, was informed he would face a vote on his leadership on Sunday during the Queen's Platinum Jubilee, after weeks of speculation over his future.
The ballot was triggered by Conservative MPs after at least 15% of them wrote letters of no confidence to Sir Graham Brady, the chairman of the party's backbench 1922 Committee.
Discontent among Tory MPs has grown since a highly critical report into lockdown parties in and near Downing Street during the Covid-19 pandemic was published last month.
The report laid bare the extent of Covid rule-breaking in Number 10, including at a birthday party Mr Johnson was fined by the police for attending in June 2020.
The fine meant Mr Johnson became the UK's first serving prime minister to be sanctioned for breaking the law.
Some Tory MPs have also expressed dissent over tax rises, the government's response to rising living costs and its policy direction.