The Republican-controlled Senate bowed to Democratic pressure last night and passed a new four-year farm bill that critics said would do little to improve the battered agricultural economy.

Hours of closed-door negotiations yesterday produced an impasse-breaking agreement on farm-income supports and other key provisions, clearing the way for a 61-to-28 vote by the weary Senate.

The measure would mean reduced income for farmers over the next four years, but it also represented a setback for the Reagan administration.

Despite heavy White House pressure to cut farm program costs even further, the more generous compromise was estimated to be several billion dollars above the $50 billion the administration had deemed acceptable.

The Senate vote will allow House-Senate conferees to begin negotiations on a final version after the Thanksgiving recess. Farm Belt Democrats in the Senate said yesterday that they will maintain pressure on the conference to "improve" the bill.

Agriculture Secretary John R. Block said the measure has "some very good provisions that can lead us to a market-oriented agriculture." He said the bill "is still more expensive than we would like" and the administration would focus on the conference to make changes.

The compromise also included an agreement that the Senate would take up separate legislation on Dec. 3 aimed at reshaping the faltering Farm Credit System and giving the federal Farm Credit Administration more regulatory power over the system.

Block urged the Senate and the House, which is considering a similar bill, to act quickly to shore up investor and farmer confidence in the system. The FCS holds about a third of the nation's $214 billion farm debt.

Other key elements of yesterday's compromise included:

*A two-year freeze on income subsidies paid to grain, rice and cotton farmers, instead of the one-year freeze sought by the White House. Democrats who wanted a four-year freeze had blocked final action on an earlier "multiple choice" version crafted by Senate Majority Leader Robert J. Dole (R-Kan.) that had both a one-year and a four-year freeze.

*At the insistence of midwestern Democrats, Dole agreed to change a formula that would have given soybean farmers a $35 per acre federal subsidy in return for lower price supports.

The Midwesterners argued that the earlier version favored lower-yielding Southern soybean farms.

The Senate action resolved a dramatic test of will that had kept the Republican leadership and Democrats locked into a quarrelsome standoff that began on Friday and continued into the predawn yesterday.

The chamber finally recessed at 3:45 a.m. and returned at noon for its final round.

The Democrats were unrelenting, repeatedly blocking Dole's efforts to push the bill to final passage with the contradictory freeze language.

During months of intensely partisan fighting, keyed by crucial 1986 elections, debate swirled around the same issue -- the administration's drive to cut soaring program costs and Farm Belt demands for more aid to pump up a farm economy that's in its worst shape in 50 years.

The congressional division was reflected on the final vote, with the parties split almost evenly. Agriculture Committee Chairman Jesse Helms (R-N.C.) and 14 other Republicans were against it, while 32 Republicans voted in favor of it.

Sen. Tom Harkin (D-Iowa), who helped forge the compromise then voted against it, said the battle was more over farm policy philosophy than politics. "Secretary Block told us this afternoon that philosophy was overriding . . . but the farmers are the losers in this."

In the end, the Senate and House went along with White House insistence that price-support loan levels, which put a floor under farm commodities, be lowered to discourage overproduction and to make U.S. exports more competitive.

Counter to the administration, however, both chambers voted to offset the lower prices by freezing income-support payments for grain, cotton and rice farmers. The Senate confused matters by adopting two conflicting freezes -- a move by Dole to break that parliamentary deadlock and pass the bill.

The contradictory language was part of a Dole-Helms package that included enough sweeteners for various commodities to crack the Democratic-led coalition that had stymied the administration quest for just a one-year freeze.

But Dole's strategy left some scars, especially among senators from economically hard-hit grain states. An angry Sen. J. James Exon (D-Neb.) charged at one point that "sugar people" had turned against corn and "sold out time and time again."

Among its 19 different titles, ranging from farm research and credit to food stamps and export promotion, the bill also would lower dairy price supports to discourage surplus production that will cost the government more than $2 billion this year.

A conservation section, which closely tracks the House bill, would create a "reserve" of up to 40 million acres, paying farmers to retire highly erodible land.