Only hours before the House's 316-108 vote, Mr. Bush had vetoed the five-year measure, saying it was too expensive and gave too much money to wealthy farmers when farm incomes are high.
The legislation includes election-year subsidies for farmers and food stamps for the poor - spending that lawmakers could promote when they are back in their districts over the Memorial Day weekend.
The Senate could turn to the bill as soon as Wednesday night; there were expected to be enough votes to overturn the veto.
The veto was the 10th of Mr. Bush's presidency. Congress so far has overridden him once, on a water projects bill.
With Mr. Bush at record lows in the polls in the waning months of his term, it was fellow Republicans who joined with majority Democrat in rejecting the veto. GOP lawmakers are anxious about their own prospects less than six months from the Election Day.
About two-thirds of the bill would pay for nutrition programs such as food stamps; about $40 billion is for farm subsidies; and additional $30 billion would go to farmers to idle their land and to other environmental programs.
Congressional Republicans overwhelmingly abandoned Mr. Bush in voting to pass the bill last week. They overlooking its cost amid public concern about the weak economy and high gas and grocery prices. Supporters praised the spending on food stamps and emergency food aid.
"Twenty-five percent of my state is now in need of food assistance," said Rep. Thaddeus G. McCotter, R-Mich. "I work for them, not for the president."
White House spokeswoman Dana Perino said the bill could make the situation worse for struggling families.
"Members are going to have to think about how they will explain these votes back in their districts at a time when prices are on the rise," she said. "People are not going to want to see their taxes increase."
Mr. Bush said the legislation needlessly would expand government. He cited one new program in the bill that would pay more to corn farmers and others if agriculture revenue were to drop significantly in the next five years. This program, he said, could add billions of dollars to the cost of the bill.
He added that minor cutbacks to subsidies for wealthy farmers were not sufficient.
"At a time when net farm income is projected to increase by more than $28 billion in 1 year, the American taxpayer should not be forced to subsidize that group of farmers who have adjusted gross incomes of up to $1.5 million," the president said in his veto.
Congressional negotiators tried to make some last-minute changes in the bill to come closer to the White House on that issue.
The bill would make small cuts to direct payments, which are distributed to some farmers no matter how much they grow. It also would eliminate some payments to individuals with more than $750,000 in annual farm income - or married farmers who make more than $1.5 million. Previously, negotiators were considering a $950,000 income cap for individuals on farm income.
Individuals who make more than $500,000 or couples who make more than $1 million jointly in nonfarm income also would not be eligible for subsidies.
Under current law, there is no income limit for farmers, and married couples who make less than one-fourth of their income from farming will not receive subsidies if their joint income exceeds $5 million.
The administration originally proposed a cap for those who make more than $200,000 in annual gross income, but later indicated it could accept a limit of $500,000.
The chairman of the House Agriculture said the version of the bill vetoed by the president was missing one section by mistake. But Rep. Collin Peterson, D-Minn., said he expected that issue to be resolved. Aides said the section, which includes international food aid, might have to be passed separately or as part of a different bill.
The farm bill also would: