The Republican-controlled Senate last night scuttled hopes for civil rights legislation this year, sidetracking it to clear the way for passage of a spending bill to fund most government operations after they run out of money at midnight today.

The 53-to-45 largely party-line vote to strip the rights measure from the "continuing resolution" spending bill came after civil rights forces rejected a watered-down version from Republicans, which Sen. Edward M. Kennedy (D-Mass.) denounced as a "cold and calculating compromise . . . a fig leaf over the denial of civil rights."

The action, followed quickly by shelving of conservative-backed gun-control and school-busing proposals, broke the logjam on the spending bill, raising hope that it can be passed in time to prevent a disruption in government services Thursday.

It also revived previously shaky expectations that Congress might adjourn within at least a day or two of its Friday target.

Pleading with his colleagues for restraint in pushing other extraneous proposals, Majority Leader Howard H. Baker Jr. (R-Tenn.) said he would keep the Senate in session all night if necessary to get the spending bill to conference with the House today and to President Reagan for signature early Thursday. The Senate worked into early morning in hope of finishing by dawn.

The rights bill, passed overwhelmingly by the Democratic-controlled House earlier this year and cosponsored by 63 of the 100 senators, would have reversed the Grove City College v. Bell Supreme Court decision last February that sharply narrowed coverage of federal antidiscrimination laws. The compromise would have reversed the Grove City ruling for educational institutions only, leaving coverage of other activities in a legally ambiguous situation, according to Sen. Bob Packwood (R-Ore.).

This, said Kennedy, would have established a "dual standard" for coverage of civil rights laws for the first time, constituting a "major retreat."

Before the futile last-ditch effort at compromise, the chamber echoed with some of the most emotional oratory of the session as Kennedy and Packwood, chief sponsors of the rights measure, parted company on whether to continue pushing the measure.

Packwood spoke softly of the "heartbreak" of moving so far only to be defeated by skillful manipulation of Senate rules by conservatives opposed to the bill, while Kennedy shouted his intention to continue fighting, declaring, "Shame on this body, shame on this body."

Meanwhile, the House took action to:

*Assure Social Security beneficiaries of a cost-of-living adjustment in January. The politically popular legislation requested by the Reagan administration, would provide a one-time waiver of a requirement that the consumer price index increase by at least 3 percent during the year for any cost-of-living adjustment to be paid.

*Toughen anticrime laws. The anticrime package, hastily introduced by key Democrats, included provisions to increase drug penalties, allow pretrial detention of defendants in some federal criminal cases, revise rape laws and make it more difficult to use an insanity defense. Many of the provisions had been passed by the House as separate bills.

*Require the president to submit a balanced budget each year along with any presidential budget proposal that is not balanced.

The civil rights bill was one of several major measures that are threatened by the rush to adjournment, ranging from the anticrime bills to environmental legislation, new funding for water projects and allocation of highway funds. Some of these, and other bills as well, were targeted for inclusion in the catch-all spending bill, but the Senate's drive to strip it of all extraneous issues compounded the problem of passing the measures in the last few days of the session.

The spending bill, known as a "continuing resolution," is needed because Congress failed to pass nine of its 13 regular appropriations bills by the start of the new, 1985 fiscal year Monday.

A stopgap measure was approved Monday, but it runs out at midnight today, threatening a major disruption in government activities unless the continuing resolution is passed.

After the civil rights compromise offered by Republicans was blocked by Kennedy, Baker said he would accommodate any efforts to bring it up separately or in connection with a debt-ceiling extension that also must be passed before adjournment. However, Kennedy said he would not try again in this session to push for the civil rights bill. "We will battle again on this issue in the next Congress," he said. Packwood said he, too, would fight for it again next year.

Among Washington-area senators, only Sen. Paul S. Sarbanes (D-Md.) voted against tabling the Kennedy-Packwood measure.

The first break in nearly a week of legislative deadlock on the spending bill came in midafternoon when Baker presented a package deal: Packwood would move to strip off the civil rights bill and Sen. James A. McClure (R-Idaho) would do the same on the gun-control and school-busing proposals.

The plan was to create powerful momentum for stripping the spending measure of all extraneous amendments that might hang it up and prevent passage.

The move brought Packwood and Kennedy, who worked together for months to win passage of the rights measure, into a dramatic, although polite and respectful, clash before an unusually crowded, hushed and attentive chamber.

In what Sen. Daniel Patrick Moynihan (D-N.Y.) later referred to as "anguished eloquence," Packwood said he had to move with a "heavy heart" to table his proposal because Sen. Orrin G. Hatch (R-Utah) and other foes had him boxed in on procedure.

"My good friend from Utah has won because the goals I sought are beyond my grasp at this point," said Packwood, whose aides said Hatch's procedural arsenal, including roughly 1,300 amendments aimed at delaying passage, was too formidable to overcome.

Moreover, Packwood added, procedures for protecting minority views in the Senate were in danger of being trampled and this could be a more serious blow to civil liberties in the country than passage of any single measure, even one as important as the Civil Rights Act.

But Packwood also bluntly warned his colleagues that the Leadership Conference on Civil Rights was prepared to interpret his tabling motion as a vote against civil rights that would be used in assessing the performance of senators, which could be critical in some campaigns.

In a thunderous voice that stood in contrast to Packwood's muted tones, Kennedy said it would be a "shameful day for this body" if it scuttled what he called the most important legislation of the year to conduct "business as usual" and meet its adjournment schedule.

Shortly thereafter, Sen. Robert J. Dole (R-Kan.) took the floor to suggest one last attempt at a compromise, which he said the opposing sides had been "within about a half inch" of reaching Monday night before aides bogged down on details of the settlement.

With that "flicker of hope," as Dole put it, the opposing sides went back into Baker's office just off the Senate floor to make a final effort.

Kennedy said Dole's original proposal held out some hope for compromise, although the final offer, drafted to accommodate religious and other exemptions sought by Hatch but not modifications sought by liberals, was unacceptable.

Packwood moved to scuttle his bill after two stunning victories by civil rights forces, including a cliff-hanging vote to allow consideration of the measure in connection with the spending bill and later an overwhelming 92-to-4 vote to impose debate-limiting cloture on it.

The problem was that the cloture vote did not shut off delaying tactics. Hatch had indicated he would fight to the end, even to the point of letting the government shut down, to prevent passage of the Kennedy-Packwood version of the measure.

Civil rights lobbyists milling around outside the chamber expressed shock and outrage. "A vote to table is a vote to subsidize discrimination . . . to kill the civil rights bill of 1984," said Ralph Neas, executive director of the leadership conference.