Home Secretary Jacqui Smith said: "I pay tribute to Sir Ian for the massive reductions in crime that his leadership of the Met has overseen and his continuing efforts to tackle gun, gang and knife crime.
"His part in leading neighbourhood policing across London has led to Londoners being safer and more confident."
But she accused Mr Johnson of ignoring protocol regarding the mayor's relationship with the police, adding: "Frankly you should put a bit of time and effort into that before you jump to judgement."
Mr Johnson, who took over as chairman of the police authority on Wednesday, has avoided publicly backing Sir Ian since being elected Conservative Party mayor in May.
Speaking after Sir Ian's resignation, the mayor said: "There comes a time in any organisation when it becomes clear it would benefit from new leadership and clarity of purpose. I believe that time is now."
Sir Ian's tenure as head of Britain's biggest police force started confidently with reforms including community support officers, neighbourhood police, and a more diverse workforce.
The new mayor made clear, in a very pleasant and determined way, that he wished there to be a change of leadership
But some senior officers disliked his close relationship with Downing Street when Tony Blair was prime minister, and his leadership style.
There were questions about his handling of events surrounding the 2005 death of Jean Charles de Menezes, who was shot dead at Stockwell Underground station in south London after being mistaken for a suicide bomber.
The Met Police was later convicted of a health and safety offence over the incident.
Sir Ian was also criticised after publicly questioning why the murders of two girls, Holly Wells and Jessica Chapman, in Soham, Cambridgeshire in 2002, had been such a big story in the media.
It later emerged he had recorded a telephone conversation with the attorney general without asking his permission.
In 2006, in the course of arresting two brothers who were later cleared of any involvement in terrorism, armed Met officers shot and injured one of them.
Recently, Sir Ian has faced criticism over the racism row involving the Met's most senior Asian officer Tarique Ghaffur.
And Metropolitan Police Authority auditors are in the process of examining Scotland Yard contracts given to consultancy firm Impact Plus, run by a friend.
Boris Johnson says a new start for policing in London is needed
Sir Ian has said he had been "open and straightforward" in informing both the police service and the police authority about the friendship.
Sir Ian, whose contract was due to run until 2010, defended his record as he announced his resignation at Scotland Yard.
"I am resigning not because of any failures of my service and not because the pressures of the office and the many stories that surround it are too much.
"I am resigning in the best interests of the people of London and of the Metropolitan Police Service."
Shadow home secretary Dominic Grieve said Sir Ian had taken the "right decision" in standing down.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.