Congress neared completion of its budget agreement with the Reagan administration early today, approving one component of the $33 billion deficit-reduction package while the other barely squeaked through the House and headed for a final vote in the Senate.

The action may not forestall a government shutdown this morning. The administration said it may not have sufficient time to review the legislation, and a one-day stopgap spending bill -- the fourth short-term funding bill since Oct. 1 -- expired at midnight last night.

President Reagan did not promise to sign the legislation, but most administration objections to it were removed during the long day of negotiations.

Office of Management and Budget Director James C. Miller III said federal workers should come to work this morning, but said "formal shutdown procedures" could begin because a new funding bill would not be in effect.

The first deficit-reduction measure, approved 237 to 181 by the House and 61 to 28 by the Senate, would provide about half of the deficit reduction in both packages, $9 billion of it in higher taxes mostly affecting wealthy individuals and corporations and the remainder from asset sales and spending reductions in permanent federal programs such as Medicare and farm subsidies.

Action on the bill, a compromise negotiated during the last eight days between House and Senate versions, continued a legislative marathon that stretched into the morning.

The second package, a $600-billion omnibus appropriations bill containing a controversial compromise on aid to the Nicaraguan contras, was approved by the House on a 209-to-208 vote at 2:24 a.m. and sent to the Senate.

Among other provisions, that bill cuts military spending by $5 billion, discretionary domestic programs by $2.6 billion, and funds most government operations through the end of the fiscal year on Sept. 30.

Floor debate on the two deficit-reduction bills was repeatedly delayed yesterday as negotiators dickered over last-minute details on a number of issues in the huge package, and lawmakers became embroiled in a fight over whether to include the "Fairness Doctrine" in one of the measures -- a move that risked a presidential veto.

Late last night, negotiators on the omnibus spending bill voted to drop the Fairness Doctrine, which requires broadcasters to air competing points of view on controversial issues.

They did so as part of a trade-off with Reagan administration officials, who agreed to abandon their objections to the budget bills.

The administration had contended that cuts in Medicare and Postal Service spending, as well as asset sales, were not sufficient to meet the budget agreement's $30.2 billion deficit-reduction target.

But they accepted legislative language promising to make further deficit reductions next year.

The Fairness Doctrine "was sacrificed on the altar of necessity," said House Speaker Jim Wright (D-Tex.), who had strongly supported retaining the doctrine. "I guess everybody yielded some."

House debate on the tax increase and spending cut bill highlighted the controversy and hard feelings that have suffused the budget process all year, despite the landmark "budget summit" last month that brought Reagan administration officials and congressional leaders to the bargaining table following the Oct. 19 stock market collapse.

Typifying many Republican objections, Rep. Bill Frenzel (R-Minn.) said, "If we are obliged to pony up new taxes, we should have had substantial spending cuts."

But House Budget Committee Chairman William H. Gray III (D-Pa.) said, "There are 535 members of Congress and probably 535 deficit-reduction plans, but we can only implement one."

Yesterday's events followed a hectic weekend of negotiations that finally yielded an agreement on the most contentious issue, providing further nonlethal aid to the Nicaraguan contras.

Under that compromise, the contras would receive another $8.1 million through the end of February, and Congress would have a showdown vote on new military aid Feb. 4 if the Central American peace process collapses.

In addition to reducing the deficit, the legislation taken up last night crams into two gigantic measures major policy decisions on several subjects including foreign aid, military hardware sales, the 65 mph speed limit and a ban on smoking on some airline flights.

The major impediment had been a standoff over language enacting the Fairness Doctrine that was included in the massive appropriations bill.

The Fairness Doctrine, in force for 38 years until the Federal Communications Commission ceased enforcing it in August, requires broadcasters to offer reasonable time for the airing of competing viewpoints on controversial public issues.

Earlier this year, Reagan vetoed free-standing legislation reviving the doctrine, and he repeatedly vowed to veto the catchall spending bill if it was included. That threat had hung like a storm cloud yesterday over both the deficit-reduction package and Congress' hopes of adjourning.

The conference committee on the spending bill earlier had voted to include the broadcast standard in the bill, and the drama played out through most of the day, beginning with several close votes in the conference committee yesterday morning.

The votes put the House on record favoring the doctrine's inclusion and the Senate opposed.

That raised the prospect of the bill going to the floor with an amendment in disagreement, which in turn would have opened the bill up to consideration of other controversial amendments on the floor.

The final conference vote on the issue was delayed so that Rep. C.W. (Bill) Young (R-Fla.) could return to Washington to help delete the doctrine from the bill.

A conferee on the spending bill, Young had missed the morning votes in conference because he was with his 6-month-old son Patrick as the baby underwent ear surgery in St. Petersburg.

The deficit-reduction package would reduce the projected $180 billion federal deficit this year by about $33 billion.

It would also negate the $23 billion in automatic cuts in the budget that otherwise would take full effect under the revised Gramm-Rudman-Hollings balanced-budget law enacted earlier this year that calls for balancing the budget by fiscal 1993.

Enactment of the full package would still leave this fiscal year's deficit close to last year's level of $148 billion, however.

The $600 billion appropriations measure combines -- for the second time in a row and only the third time in history -- all 13 regular appropriations bills, none of which

has been separately passed this year.

The bill would leave military spending authority at about $292 billion, almost the same level as last year, continuing for the third year the slowdown in Reagan's military buildup.

Among the policy items in the bill are a continuation of funding for the Midgetman missile; the sale of Stinger antiaircraft missiles to Bahrain; a resumption of foreign aid to Pakistan; a 2 percent pay increase for most federal workers; a delay in sanctions against cities that do not meet air pollution standards; a ban on smoking on short domestic airline flights, and an expansion of the 65 mph speed limit in up to 20 states.

The other measure would raise $9 billion in taxes, mostly directed to corporations and wealthy individuals, with the exception of an extension of the 3 percent tax on telephone service.

Other tax changes include limiting deductions on home mortgages over $1 million, freezing top estate-tax rates, extending a surtax on unemployment insurance taxes, imposing taxes on stock gains by corporate raiders and forcing earlier tax payments by defense contractors.

The tax and spending bill also saves $2.1 billion in Medicare, partly by retaining the automatic Gramm-Rudman-Hollings spending cuts until next April; $850 million from the Postal Service and by limiting lump-sum payments to all retiring federal workers, and about $1 billion by reducing target prices and loan rates for farmers.

It also puts a nuclear-waste dump site in Nevada.

Staff writer Lou Cannon contributed to this report.