President Reagan scored a decisive political triumph yesterday as House Democratic leaders failed, 217 to 210, to scuttle his latest initiative on spending cuts.

The president also won a more predictable victory in the Republican-controlled Senate, which last night voted, 80 to 15, to approve its $39.6 billion version of Reagan's budget reductions.

Before finishing, the Senate voted to add $300 million to the $200 million it previously approved for impact aid to school districts serving children of federal employes, thereby providing about two-thirds of the current spending level for the program.

In the House, once again it was conservative Democrats, prodded by long-distance telephone appeals from the vacationing president, who supplied the margin of victory as Reagan prevailed on the up-or-down vote that he wanted for his proposed spending cuts.

In doing so, the bipartisan conservative coalition rejected the Democratic leadership's last best hope for softening the blow of the Reagan spending cuts by carving his package of proposals into six pieces, stripped of any spending restoration "sweeteners." Democratic leaders had hoped to win by forcing members to vote separately on each major category of cuts without the protective cover of voting for Reagan's program as a whole.

The outcome, which surprised some Republicans as well as Democrats, demonstrated -- more vividly than before -- that effective control of the House lies in the hands of the Republicans and their conservative Democratic allies, at least for the time being.

"I've never seen anything like this in my life, to be perfectly truthful," lamented Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.). On the day before, O'Neill thought that the Democratics that they were asking the House to buy a "pig in a poke."

But Democrats appeared to hold little chance of winning in a head-to-head showdown between Reagan's package of cuts and cuts proposed by Democratic-dominated House committees.

As it was, the Democrats seemed to have lobbed their entire arsenal of rhetoric into yesterday's debate. Leading the charge, House Rules Committee Chairman Richard Bolling (D-Mo.) accused the Republicans of "attempting to destroy the budget process for a narrow partisan gain in support of a radical, doubtful program." The Republican legislators, he said, were "hiding behind a still-popular president and an economic program that no one really believes in."

Not to be outdone by the Democrats, Minority Leader Robert H. Michel (R-Ill.) castigated them for trying to divide Reagan's program against his will and for modifying the package. "These are no longer our amendments," he shouted, amid cheers from Republicans and groans from Democrats. "They are bastards of the worst order."

The real action was not on the House floor, despite the drama of the fiercely partisan clash. Off the floor, as the climactic roll approached, wavering Democrats were getting persuasive phone calls from Reagan himself and silently falling into line.

Republicans even stretched out the time for one-minute speeches at the days' start, giving Reagan more time to contact members and, according to Democrats, hold out the lure of the kind of pork-barrel attractions that only a president can offer.

"The Democratic cloakroom had all the earmarks of a tobacco auction," complained House Budget Committee Chairman James R. Jones (D-Okla.) after the Democrats had lost. At least some farm programs appeared to be better off after the legislative bidding was over, he said.

Yesterday's action in the House -- and similar but less combative budget action in the Republican controlled-Senate -- stemmed from an unprecedented action by Congress last month to require its committees to make at least $35.1 billion worth of cuts in existing programs next year to meet Reagan's goal of a leaner federal budget.

The House committees' proposed cuts totaled $37.7 billion, or $2.6 billion more than Congress mandated in its so-called "reconciliation" orders last month.

Aiming for nothing less than total victory, Reagan's budget director, David A. Stockman, and House Republicans claimed the committee cuts did not go deep enough, especially in fast-growing, open-ended entitlement programs. So they proposed an alternative that they said would save more than $20 billion above what the commitees proposed to save over the next three years, including an extra $5.9 billion next year.

But, in order to gain votes, the White House also allowed some spending restorations, or "sweeteners" that would add back nearly $10 billion through 1984, including $3 billion next year. Thus, the savings are substantially less than originally claimed.

The Reagan proposals are still markedly more severe, however, in many areas than what Democratic leaders thought the full membership would accept.

The Reagan substitute would impose strict new eligibility requirements for food stamps, reduce guaranteed loans for middle-income college students, eliminate the Social Security minimum benefit, cut spending for school lunches and tighten welfare requirements along with requiring work in exchange for welfare benefits.

It would also put a "cap" on Medicaid spending and give states more flexibility in cutting Medicaid costs and cut back the number of new subsidized housing units while making tenants pay more to live in subsidized housing.

For federal workers it would reduce the proposed pay increase for next year from 5.8 percent to 4.8 percent and eliminate one of two cost-of-living increases that government retirees get in their pensions. Impact aid would be targeted more toward school districts with big military installations.

But there are winners as well as losers in the Republican proposal: military retirees who take civilian jobs would not have their compensation reduced, as the committees' package proposed. Nor would Social Security recipients face a three-month delay in receiving their 1982 cost-of-living increase. Proposed cuts for the Export-Import Bank would be softened, and the Clinch River fast breeder reactor in Tennessee would get a new lease on life.

Finally Reagan would win a modified version of his original proposal for consolidating many existing federal programs in the health, education and social services areas into block grants for the states, for broad latitude for states to modify or drop individual programs.

In yesterday's vote, 29 Democrats bolted their party to support Reagan -- less than half the number that helped him win his preliminary budget blueprint last month but more than enough to win again for him. Only one Republican voted against the GOP position and that was apparently an accident. Rep. John T. Myers (R-Ind.) said he made a mistake in casting his vote.

Deputy Democratic Whip Bill Alexander (Ark.) and other Democrats attributed the defections largely to Reagan's continued popularity among southerners, despite his drop in national polls, and to his last-minute lobbying efforts. "Many southerners were torn between their desire to support the president and their loyalty to the Democratic Party . . . and the president won," said Alexander.

Some Democrats were so outraged at the defections, which included Veterans Committee Chairman G. V. (Sonny) Montgomery (D-Miss.) and at least a dozen subcommittee chairmen, that they immediately launched a drive to set up disciplinary machinery for the future.

Rep. William M. Brodhead (Mich.), chairman of the 210-member Democratic Study Group, said the DSG's executive committee agreed after the vote to create a committee to make recommendations to the party leadership on enforcing discipline by revoking chairmanships or other methods. "There's a strong and bitter feeling that something has to be done," said Brodhead.

But the reaction from the administration was strictly upbeat. "It's a very healthy sign that fair-mindedness has returned to the House of Representatives," said Treasury Secretary Donald T. Regan. "At least they're giving the president a chance to get his bill before Congress for a vote," said Regan.

In contrast to the tumultuous House, the Senate moved with relative ease toward virtually the same results. Outnumbered Democrats confined themselves to putting Republicans on record against cuts in popular programs.

They won a bipartisan agreement to strip the measure of extraneous, non-budgetary provisions such as housing authorizations and communications industry deregulation, but the Senate later reversed itself and restored the provisions.