Mr Cameron's warm words came despite years of rivalry between the two Old Etonians, with many Conservative MPs believing Mr Johnson is manoeuvring to try to succeed Mr Cameron as Tory leader.
That would depend on Mr Johnson becoming an MP once again - possibly before the next general election - a prospect Mr Cameron appeared to entertain in his remarks.
The Prime Minister said: "Boris can do anything, that's the moral of the story of Boris.
"Boris is one of the greatest assets the Conservative Party has. I love Boris."
Asked whether the London Mayor could one day become prime minister, Mr Cameron replied: "I'd never want to put a limit on what Boris can achieve."
Mr Johnson has been linked with several possible Tory constituency, including Louth and Horncastle in Lincolnshire where the incumbent MP, the veteran Sir Peter Tapsell, has informed Mr Cameron he is "keeping the seat warm" for the mayor and could stand down at the next general election in 2015.
It would be a trickier task for Mr Johnson to return to the Commons before the election, as his mayoral term runs until 2016 and he would have to do both jobs simultaneously.
Mr Johnson gave his strongest hint yet in a recent BBC TV progamme that he would like a tilt at the top job, telling his interviewer, Michael Cockerell: "If the ball came loose from the back of a scrum, it would be a great thing to have a crack at."
Speculation earlier this year that Mr Cameron could face a leadership challenge before the next election has faded recently, with the Conservatives reuniting after the death of Lady Thatcher, and the Prime Minister extending the hand of friendship to some of his disaffected backbenchers.
However, senior figures in Downing Street are aware that concerns about Mr Cameron's future could re-emerge if the Tories suffer a very bad set of results in local elections in May.
Last week, the Prime Minister appointed Mr Johnson's younger brother Jo Johnson, the Tory MP for Orpington, head of his policy unit at No10 in a surprise move.