The bill includes federal help for homeowners which provides a new permanent affordable housing fund financed by Fannie Mae and Freddie Mac, and the $3.9bn for areas hit-hard by the foreclosure crisis.
Fannie Mae and Freddie Mac are government-sponsored enterprises, or GSEs, which own or guarantee almost half of the nation's $12 trillion in outstanding residential mortgage debt.
The two companies have seen their shares plunge by around 75 per cent since the start of the year as losses from their mortgage holdings threaten their financial survival.
Congressional budget analysts have put a $25bn potential price tag on the provision to bolster Fannie and Freddie, but pointed to a wide range of possible costs.
In a policy statement on the bill, the White House said that it had compromised with Democrats because parts of it were "too important to the stability of our nation's housing market, financial system, and the broader economy not to be enacted immediately".
| Paulson pushed for the deal despite calling parts of it "wasteful" [EPA]
However many Republicans denounced the housing legislation as a bail-out for irresponsible homeowners and unscrupulous lenders.
"It's a bill that I wish I could support. It's a bill that the market clearly needs...but this is not a bill that I can support,'' said John Boehner, the Republican House minority leader.
Henry Paulson, the US treasury secretary, had also described the move to provide federal aid to struggling homeowners as "wasteful".
But he said he had urged Bush to drop his veto threat over the provision because of the other important elements in the bill that would provide support to Fannie Mae and Freddie Mac.
"It is a strong message that we are sending to investors around the world and in the United States that we understand the importance of these organisations to our capital markets and to our housing markets," he said earlier on Wednesday.
The subprime mortgage crisis began after thousands of homeowners took out mortgages they could not afford to re-pay.
That has led to US banks reporting record losses and chaos in international financial markets.