Emergency legislation to keep most of the government from shutting down tomorrow was stymied in the Senate early this morning in a dramatic, high-stakes showdown between most Republicans and Sen. John P. East (R-N.C.) over an administration-backed bill to raise the gasoline tax.

But despite the stalemate, Senate leaders informally designated conferees early today to begin drafting a compromise with the House, which passed its version of the continuing resolution more than a week ago. The conference was scheduled to begin this morning.

Senate Majority Leader Howard H. Baker Jr. (R-Tenn.) told the Senate the resolution will pass eventually, although it was not immediately clear how or when this would happen. It was conceivable, given the bizarre turn of events, that a conference agreement might be reached before the Senate had formally adopted its version of the bill.

Shortly after midnight, Baker told senators they could go home while he and East continued to stare each other down.

Earlier last night, just as the Senate was on the verge of passing the stopgap spending bill, East seized the floor in an attempt to thwart a last-ditch leadership maneuver to break a week-long filibuster by conservative Republicans against the proposed nickel-a-gallon increase in the gas tax.

In effect, East was holding the spending legislation hostage to prevent passage of the tax bill, at least temporarily delaying passage of the "must" bill to restore spending authority for government agencies for which previous authority expired at 12:01 a.m. Saturday.

It was unclear early this morning whether East would relinquish the floor without forcing the leadership to back down on the gas tax increase. However, Baker vowed not to give in.

But, even if the measure gets past East and through Congress, it still faces a threatened veto by President Reagan because both House and Senate versions contain money for jobs--$5.4 billion from the House and $1.2 billion from the Senate--that Reagan does not want.

The president reiterated yesterday that he objects to both versions but left the door at least slightly ajar to a compromise that, according to Senate aides, might include some "humanitarian" aid to the unemployed. Neither Reagan nor Senate sources gave any specifics.

Even as the Senate was plodding earlier in the evening through a long list of amendments to the spending bill, Republicans decided to make one last effort to break the gas tax filibuster and ram through the measure, which would finance $5.5 billion worth of highway repairs by raising the federal gasoline tax from 4 to 9 cents per gallon.

The administration-backed gas tax measure, which was to have been the centerpiece of the current lame-duck session of Congress, has been filibustered by a handful of conservative Republicans who have tied the GOP-controlled Senate in knots for more than a week, preventing final action on the bill.

Emerging from a GOP caucus on strategy for breaking the filibuster, which has embarrassed and frustrated the once-almost-invincible Republican leadership, Baker said the bill still faces problems. Asked if he was optimistic about passage, he said grimly: "The better way to put it is that I'm still determined."

In a radio interview yesterday, Reagan called again for action on the measure, saying it is "ridiculous for a minority to stand in the way of this bill," which he called an "emergency" matter. But he stopped short of demanding that Congress remain in town through the holidays to complete action on it, as some Republican congressional leaders have been asking him to do.

Reagan said the bill represents an emergency because of the dangerous state of highways and bridges and the costs that highway and bridge hazards pose to business and the economy as a whole.

Although he has declined to call it a jobs measure, as many of its congressional backers have done, Reagan noted that "as a sideline benefit, the highway bill would create as many jobs as the Democrats claim their $5.4 billion pork barrel would create."

Leadership aides said Reagan talked with Baker by phone yesterday and endorsed both the last-ditch effort to pass the gas tax increase and the tactics for pushing it through, which involve brushing aside some of the niceties of normal Senate procedure to avoid time-consuming roll calls on as many as 400 amendments proposed by the filibusterers.

Sen. Jesse Helms (R-N.C.), one of the filibuster leaders, conceded the tactics might work, and Sen. Don Nickles (R-Okla.), one of Helms' colleagues, said, "It's going to pass and I'm not going to stop it."

But, just as Senate leaders were about to ask for final passage of the spending bill last night, East started a lengthy discourse touching on both that measure and the gas tax, prompting Baker and other leaders to shuttle on and off the floor for negotiations.

Baker, complaining that "at some point we've got to get on with the business at hand," asked East to let the Senate vote on the spending bill. Otherwise, Baker said, senators could just "sit here and look at each other for the rest of the night." East refused.

Minority Leader Robert C. Byrd (D-W.Va.) said the Democrats would stand with Baker and were prepared to give him enough votes to break the filibuster whenever an opportunity arose.

So chaotic was the situation even as the day started that Baker, when asked yesterday morning for details of the legislative schedule, responded wearily, "How the hell would I know?"

At another point, Sen. Paul E. Tsongas (D-Mass.), expressing an exasperation that many senators shared with regard to the paltry accomplishments of the lame-duck session, exploded at what he called manipulation of Senate rules by political extremists. He quoted the wife of a colleague to the effect that "this is not a lame-duck session but a lame-brain session."

As yesterday's session began, the Senate, tired and testy after marathon sessions all last week, hoped to wrap up work on the government spending bill in time to get it to the House-Senate conference this morning and back to the two houses for final congressional approval later today.

Existing spending authority for most of the government expired at 12:01 a.m. yesterday but, if the bill is approved and signed by Reagan by early Monday, government operations will suffer no major disruption.

If a bill has not been signed when offices reopen tomorrow, workers at agencies not funded by regular appropriations -- which includes most of the government--are supposed to report to work in the morning, although they may be furloughed later in the day.

If Reagan vetoes the measure, Baker said Congress would have no alternative but to rush through a bobtailed alternative that would in effect strip out the jobs-creating money that Reagan opposes.

As the Senate worked slowly yesterday through several amendments to the spending bill, Reagan complicated its work by renewing, in a radio interview, his threat to veto the measure if it includes the jobs money he does not want, and held the door open to an unspecified compromise.

"I cannot sign that bill. I will have to veto if it contains these various amounts that have been suggested because, in truth, these aren't job-creating bills," Reagan said, referring to the $5.4 billion jobs plan approved by the Democratic-controlled House and the $1.2 billion in jobs money in the Senate version.

But then he said that, if Congress could come up with "some addition" that has "value," he would have to "look and see if the value offset the risk of adding this new spending to the deficit."

House Majority Leader James C. Wright Jr. (D-Tex.) accused the president of playing "a sophisticated game of chicken" with Congress.

But he conceded that Reagan probably has Congress over a barrel. "A president who is intent on having his way and willing to have the government fall on its face has the advantage" because he knows Congress will not stand by as most of the government shuts down, Wright said.

As it stood late yesterday, subject to possible amendments before passage, the measure would keep the existing pay cap for members of Congress and senior federal executives but would hold open the possibility of a conference compromise with the House to allow pay raises for House members and as many as 32,300 high-level executives. The House had proposed raises of 15 percent for members of Congress and from 10 percent to 15 percent for executives.

The continuing resolution is likely to cover roughly about half of the 13 appropriations bills that were supposed to be enacted by Oct. 1, the start of the current fiscal year. Some of the biggest departments and agencies, including the Pentagon, have not received their appropriations and thus must be covered by stopgap funding.

Yesterday, the Senate also:

* Added $200 million to help poor families pay fuel bills, raising its proposed total for low-income fuel assistance to more than $2 billion, as part of an understanding reached earlier when a proposed freeze on natural gas prices was shelved. The vote was 80 to 11.

* Rejected, 56 to 38, a proposal aimed at blocking the government from support of irregular military or paramilitary activities in Central America. Defeated with it was a narrower proposal, similar to one adopted by the House earlier this month, to bar the Pentagon or CIA from providing equipment, training or advice to aid the overthrow of the government of Nicaragua or provoke military conflict between Nicaragua and Honduras.

* Unanimously approved language calling on the Federal Reserve to continue pursuing policies aimed at lowering interest rates and thereby hastening economic recovery.