The prospect of a last-ditch Democratic effort to outfox President Reagan and restore money for social welfare programs faded in Congress yesterday as House Democrats scrambled to contain their losses.

Even before Reagan lambasted their spending-cut handiwork in his nationally televised news conference, Democrats on the House Education and Labor Committee, who had expected to be at the forefront of the counterattack, met to bring their committee's proposed cuts more in line with Reagan's priorities.

And Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) indicated he would abandon efforts to restore money for social programs on the House floor if Education and Labor is able to soften the blow to programs such as child nutrition and meals for the elderly.

As jockeying continued in the House over cuts proposed by Democratic-controlled committees and the possibility of a Republican substitute for them, the Senate Budget Committee unanimously approved a $39.6 billion package of cuts proposed by Republican-run Senate committees.

The Senate plan exceeds by nearly $4.5 billion the spending-cut goal of $35.1 billion that Congress approved last month in instructing committees of both Houses to meet the spending retrenchment targets set by Reagan.

Democrats went along with the plan, although they said they wanted to strip it of changes in basic law that were unrelated to meeting the spending-cut targets. Examples cited were radio deregulation and a ban on new rental subsidies to cities like Washington and New York that practice rent control.

The House plan also exceeds the targets -- by $2.4 billion, according to Democrats on the House Budget Committee. But House Republicans and their conservative Democratic allies, joined yesterday by Reagan in his news conference, complained that many of the House-proposed cuts are illusory or, in Reagan's words, "unconscionable."

As a result, the Republicans and conservative Democrats are threatening a substitute unless changes are made -- and it was unclear yesterday whether the changes would be sufficient to satisfy Reagan and his troops.

Told of changes under consideration by Education and Labor, a Republican source close to the budget-strategy planning said, "That certainly puts a different complexion on it." But he added that the odds still favored a Republican substitute.

In a preliminary session yesterday, Education and Labor Democrats tentatively agreed to a shift of money within their jurisdiction that would have the effect of adding $400 million for impact aid for children of families that both live and work in military bases, $100 million for vocational education, $200 million for student loans, $243 million for the Head Start program and $300 million for programs for the elderly, according to Committee Chairman Carl D. Perkins (D-Ky.).

Many of these proposed add-backs are also included in tentative drafts of the Republican substitute.

To offset the more than $1.2 billion in costs, Perkins said the committee tentatively agreed to delete $800 million more from the Comprehensive Employment and Training Act (CETA) program for public service jobs and job training. The committee went back in session late in the day to consider other changes.

Much of the money that the committee would restore is for programs that Reagan's Office of Management and Budget criticized the committees for cutting in a point-by-point indictment of their work earlier this week.

Some committees, especially Education and Labor, appeared to be making especially painful cuts in popular programs in an attempt to corral Republican as well as Democratic support for an attempt on the House floor for more generous spending in a number of areas.

But the Democrats could find no diplomatic way of allowing Democratic amendments to restore spending while denying Republicans an opportunity to submit their proposals as a substitute.

Moreover, most Democratic committee chairmen reportedly were opposed to a free-for-all on the House floor that might jeopardize their priorities. This meant Education and Labor might be forced to live with cuts it proposed without a chance to modify them on the floor.

A "closed rule," banning virtually all amendments, would foreclose the Republican substitute as well as Democratic efforts to restore money. But Republicans say they are prepared to use parliamentary strategems to get their proposal to the floor, if necessary, and Democrats concede they cannot block them.

Meanwhile, O'Neill and other Democratic leaders lashed back angrily at the idea of a Republican substitute and at Reagan's criticism of them.

"It's dictatorial," said O'Neill, speaking of Reagan's treatment of Congress, "and I've never seen anything like it." Majority Leader James C. Wright Jr. (D-Tex.) accused the administration of attempting to "dictate the last scintilla of detail" on the budget and added: "I don't think they read their Constitution very well."

Said Rep. Leon E. Panetta (D-Calif.), chairman of the Budget Committee's task force on the spending cuts: "This is a fine time to start picking and choosing between who's being hurt by a $37 billion cut."

Budget Committee Chairman James R. Jones (D-Okla.) said the committees were simply following Reagan's instructions and added: "The administration cannot say what [it] recommended to be cut is the fault of the House of Representatives."

Jones noted that the House committees met the spending-cut targets for 1983 and 1984 as well as 1982, whereas the Senate committees failed to do so for the two subsequent years. If Reagan has a fight with Congress, said Jones, it should be with the Republican-controlled Senate.