The dinner and subsequent photographs prompted concern amongst Mr Cameron’s team about a potential leadership bid from Mr Johnson or Mr Gove.
It is understood that that prompted Mr Gove to pass on details about Mr Johnson’s confirmation that he will not stand in Croydon South.
That was then interpreted as being a blanket commitment by Mr Johnson in a column in the Spectator magazine.
Both Mr Johnson and Mr Gove are considered as potential successors to Mr Cameron and the pair have formed a strong friendship in recent years.
Mr Gove is said to occasionally text Mr Johnson when he is stuck in traffic in London to jokingly complain about the state of the capital’s roads.
Mr Johnson has repeatedly said he intends to serve his full second term as Mayor of London.
Rumours have circulated in Westminster that the Mayor wants to return to Parliament in 2015 before taking over from Mr Cameron.
However, Mr Johnson has regularly said he will not attempt to become Prime Minister.
Mr Johnson’s official spokesman said: “The Mayor was elected last year to serve a second four-year term. That’s what he has said he would do and that’s what he is doing.
“What he is determined to do is to help return a Conservative government in 2015. The best way to do that is to continue to promote business and drive jobs and growth in London, something that helps the whole UK economy.”
A spokesman for Michael Gove said: “We don't comment on leadership stories.”