An election-jittery House, worried about the shaky farm economy, crushed administration objections yesterday and approved budget legislation that ordered a major restructuring of the federal dairy and grain-support programs.

With a final vote of 268 to 121 on the farm package, the House completed work on a series of measures aimed at reconciling program costs with budget requirements and cleared the way for a House-Senate conference to work out differences.

The major changes, which revise the agricultural program laid out in last year's farm bill, call for an unprecedented new farmer-controlled dairy program and a plan to pay farmers not to plant grain crops as a means of curbing overproduction and improving their slumping prices.

On both fronts, the administration had expressed strong opposition on philosophical grounds, contending the dairy changes would not resolve the mounting problem of overproduction and that the grain scheme's purported savings were a sham.

Supporters of the Agriculture Committee bill claimed it would save $4.6 billion in the dairy, grain and food stamp programs over the next three years, $1.4 billion more than required by the budget resolution. But critics, led by Rep. Delbert L. Latta (R-Ohio), argued that new, but unexplained, data from the administration showed savings of only $890 million.

But with the farm economy at its lowest point in 50 years and an election less than three months away, House members yesterday quickly beat back Republican efforts to first amend the bill and then, after that failed, to recommit it to the Agriculture Committee for revision.

The controversy that raged over the budget numbers obscured the far-reaching changes in the basic commodity support programs drawn up by the committee over sharp protests of Agriculture Secretary John R. Block and the administration.

Although the program changes are subject to major revision by the House-Senate conference, this is the gist of the new House farm package:

* Dairy. Following a plan drawn up by the milk lobby, and attacked by the administration and consumer groups as the first step in creating a dairy cartel, a two-tier system of price supports would be created as a remedy for dairy surpluses that will cost the federal government about $2 billion this year.

After Department of Agriculture purchases of surplus milk goods reach 5 billion pounds, at the current price-support of $13.10 per hundredweight, a newly created National Dairy Board, made up of 15 presidentially appointed producer representatives, would set new support levels aimed at reducing production.

As an incentive, farmers who cut milk output would get rebates from an across-the-board assessment levied on all producers by the dairy board. The board also would have control over distribution and sale of any surpluses, a step that Block charges could disrupt international trade agreements.

* Grains. Unlike the administration's current voluntary program for reducing plantings, the bill would mandate a set-aside for 1983 crops of wheat, feed grains, cotton and rice; it would make direct payments to farmers for not planting part of their current acreage, and it would provide for higher price-support loan levels.

Sponsors of the grain plan contended that it would produce major budget savings by reducing federal outlays for direct subsidies and loans to farmers over the next three years.

An additional aim of the acreage reduction scheme, which supporters argued would not work unless farmers were given financial incentives, would be to reduce massive reserves of wheat and corn that cost the USDA about $1 billion annually in carrying charges.

Programs for rice and cotton would vary somewhat, but their aim would be the same: to cut rice stocks that are now at an alltime high and cotton stocks that are at their highest point since 1966.

* Food Stamps. Three-year savings of $1.3 billion are envisioned in the food stamp portion of the bill, largely through a series of administrative changes in benefits calculations and the punishment of states that administer their portions of the program carelessly.