The Prime Minister, speaking in a video released shortly after he was discharged from hospital, admitted there was a 48-hour period when things "could have gone either way".
Downing Street had insisted the PM was in "good spirits" even after his admission to intensive care, where he spent three of the seven nights in St Thomas' in central London.
In a tweet following her fiance's release from hospital, Carrie Symonds said there had been some "very dark" times in the past week.
‘The NHS has saved my life, no question’
Speaking in the video message posted online Mr Johnson thanked the "utterly brilliant" doctors, and praised the nurses for their "astonishing" care.
The PM, who was wearing a suit, will not be returning to work immediately on doctors' orders, instead recuperating at Chequers, his country residence in Buckinghamshire.
He said the NHS would be "unconquerable" in the face of the coronavirus pandemic.
He said: "I have today left hospital after a week in which the NHS has saved my life, no question.
"It's hard to find the words to express my debt - but before I come to that, I want to thank everyone in the entire UK for the effort and the sacrifice you have made and are making."
Progress being made
He thanked people for continuing to socially distance and to self-isolate, saying: "I do believe that your efforts are worth it, and are daily proving their worth."
While he said "the struggle is by no means over", he appeared to offer some hope by adding that progress is being made.
He said: "We are making progress in this national battle because the British public formed a human shield around this country's greatest national asset - our National Health Service."
Mr Johnson said he had personally "seen the pressure the NHS is under" and listed the essential staff including cleaners, cooks and all healthcare workers who he said had shown "personal courage" by continuing to work and "risking this deadly virus".
A message from the Editor
Thank you for reading this story on our website. While I have your attention, I also have an important request to make of you.
With the coronavirus lockdown having a major impact on many of our advertisers - and consequently the revenue we receive - we are more reliant than ever on you taking out a digital subscription.
Subscribe to scotsman.com and enjoy unlimited access to Scottish news and information online and on our app. With a digital subscription, you can read more than 5 articles, see fewer ads, enjoy faster load times, and get access to exclusive newsletters and content. Visit https://www.scotsman.com/subscriptions now to sign up.
Our journalism costs money and we rely on advertising, print and digital revenues to help to support them. By supporting us, we are able to support you in providing trusted, fact-checked content for this website.