Partisan budget warfare broke out anew yesterday as congressional Democrats attacked an administration-blessed proposal to squeeze $40 billion in savings from Social Security by 1985 and President Reagan defended the plan as vital to saving the financially strained retirement system.

The shootout over Social Security came in response to a budget compromise negotiated Wednesday between the White House and Senate Republican leaders, and subsequently adopted on a party-line vote by the GOP-controlled Senate Budget Committee.

While Reagan challenged Democrats to join in support of the plan, which would cut spending and raise taxes by $76 billion in order to lower the projected fiscal 1983 deficit to $106 billion, Democrats vowed to come up with a plan of their own that would attract support from dissident Republicans.

And there were some unhappy Republicans, mainly northeastern and midwestern moderates who objected to the plan's big cuts in domestic spending and relatively small cuts in defense.

But in the meantime, the Democrats made the Social Security proposal--which envisages unspecified tax increases or benefit cuts that may be recommended by a special commission later this year--the focal point of their attack on the Reagan-blessed budget compromise with Senate Republicans.

The plan amounts to "mortgaging the economic future of the elderly to finance the economic folly" of Reagan's three-year tax cut, charged Senate Minority Leader Robert C. Byrd (D-W.Va.), who subsequently joined with Sen. Daniel Patrick Moynihan (D-N.Y.) in trying to block the Social Security proposal on the Senate floor.

It anticipates "walloping defense expenditures" and "deep cuts in Social Security and other vital programs" while failing to "correct the inequities and excesses" of Reagan's tax-cut program, charged House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.).

On the other hand, Senate Majority Leader Howard H. Baker Jr. (R-Tenn.) contended that the agreement "brought the country back from economic danger" and helped "guarantee the solvency" of Social Security.

The dispute spilled over onto the Senate floor late yesterday when Moynihan, joined by Byrd, introduced an amendment to a pending defense authorization bill that would put the Senate on record as rejecting the Social Security proposal and wanting no further action on the issue until the commission reports.

Senate Finance Committee Chairman Robert J. Dole (R-Kan.) dismissed the exercise as a "partisan charade," but Democrats continued to pound away at the issue into the evening. "This is a time bomb designed to raid and loot the Social Security system, but they want to wait until after the November elections," asserted Sen. Donald W. Riegle Jr. (D-Mich.).

As the debate went on, five Democratic members of the commission issued a statement saying the panel's "integrity" would be "severely jeopardized" if $40 billion in cuts were approved without awaiting its recommendations. The statement was signed by Rep. Claude Pepper (D-Fla.), former Social Security commissioner Robert Ball, former representative Martha E. Keys of Kansas, AFL-CIO President Lane Kirkland and Moynihan.

At least one Republican, Sen. John H. Chafee (R.I.), joined the Democrats in opposing the proposed Social Security cut, saying the Budget Committee was prejudging the commission's findings. "I do not believe we should be mandating major changes in the Social Security system in the context of a debate about the budget," said Chafee.

Democrats on the Senate Budget Committee also tried unsuccessfully to restore funds for education, job training, Medicare and other social programs as the committee gave final approval last night to the budget resolution, setting $779 billion in spending targets for next year. The vote was 12 to 8, strictly along party lines. The resolution is expected to go to the Senate floor in about 10 days.

Behind all of yesterday's rhetoric was a sense that the plan--controversial as it may be--clears the way for at least some action on a budget for next year, which had been held up for three months while Republicans as well as Democrats pressed Reagan to revise the unpopular, high-deficit budget that he submitted in February. "It gives us the flexibility to put together a package that can pass," said House Budget Committee member Leon E. Panetta (D-Calif.).

The budget plan, which the Senate Budget Committee was still working on last night, sets general spending and revenue targets to be met with specific legislation fashioned by other committees. The Senate committee plans to recommend "reconciliation" instructions to the committees to guarantee that the spending cuts and tax increases are achieved. It is not clear, however, whether the House will do the same.

Despite the fanfare of Reagan's embrace of the plan at a Rose Garden ceremony with GOP leaders yesterday, it was not clear whether the president would now prevail on the budget in Congress, as he did last year. There were signs that he faces trouble, even within his own party.

While Senate Republican leadership sources claimed that the Senate could pass the plan with little, if any, change, and without Democratic help if necessary, House Republicans appeared less certain, and some moderate GOP "Gypsy Moths" voiced anger and opposition.

"We're mad as hell," said one New England Republican who contended that he and his colleagues had been encouraged by GOP leaders to try to work for a bipartisan compromise, only to find that Reagan had settled with Senate Republicans on what the New Englander called a "very partisan budget."

"On the military side, the 'budget ax' is a misguided paring knife," complained Rep. Bill Green (R-N.Y.), co-chairman of the "Gypsy Moth" group. "On the social side of the ledger, programs that have been axed in the past deserve to be spared another major blow."

Southern Democratic "Boll Weevils" who helped pass Reagan's budget and tax cuts last year were listening to both sides and withholding judgment. Budget Committee Chairman James R. Jones (D-Okla.) said they told him "they still want to work with me" on the Democratic version of a bipartisan budget.

The compromise between the White House and Senate Republicans emerged unexpectedly late Wednesday after the Budget Committee unanimously rejected Reagan's original budget and indicated it was ready to adopt a modified version of a plan advanced by committee Chairman Pete V. Domenici (R-N.M.).

"They realized we were going to have a budget" and moved quickly to influence the final product, said a Senate staffer. A committee member said Domenici had lined up the committee's GOP majority for a scaled-back version of his earlier plan, making concessions to win support of conservatives on the panel. Among the big concessions was reducing the size of the three-year tax increase from $125 billion to $95 billion.

Further concessions to satisfy the White House included keeping the Social Security cost-of-living increase for this year in exchange for the "solvency" savings that were adopted, according to a committee member.