Trump said that the prime minister confided in him about his experience with the potentially fatal virus in a phone call on 21 April, a week after he left intensive care at St Thomas’ Hospital in London.
The president’s comments come after Mr Johnson insisted in an interview with The Sun that he “never really thought that I wouldn’t come back”.
The prime minister said that thoughts of the impending birth of his son Wilfred - who arrived last Wednesday just 17 days after his father’s discharge from hospital - gave him an added drive to shake off the illness.
Asked if he feared at any point that he might not live to see his new child, the PM replied: "Well, yes, of course. We've all got a lot to live for, a lot to do, and I won't hide it from you, I was thinking about that, yes."
But he added: “I suppose there was some terrible, as I say, some natural buoyancy or refusal to give in or harbour negative thoughts. I never really thought that I wouldn't come back from it. It was more frustration."
Speaking to Fox News at a “virtual town hall” at the Lincoln Memorial in Washington, Mr Trump said: “I spoke the other day to the prime minister of United Kingdom, Boris.
“He was a victim of what happened. He thought it was over.
“He thought it was over, it was vicious, and he made it.
“He’s a great guy and he made it, but he has first-hand experience - the ultimate first-hand experience.”
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies