The London mayor and Tory MP said the House of Lords was wrong to overturn the will of MPs and accused peers of playing with fire.
The vote by the Lords last night to delay changes to the tax credit system is seen as a blow to the credibility of chancellor George Osborne.
Osborne and Johnson are likely to be rivals in the contest to replace David Cameron as Tory leader in 2020.
The mayor has been critical of the planned cuts to tax credits and has ordered City Hall staff to calculate the impact on Londoners.
But despite the rivalry, Johnson today publicly backed Osborne in his showdown with peers.
I think the House of Lords is playing very much with fire. It's a huge body of people now, more than 800, the largest chamber of political representatives anywhere outside communist China. I think they need to think about their long term future. They are not there to interfere with the settled will of the House of Commons.