The strong consensus on tax policy reflected in yesterday's 97-to-3 Senate vote is a political triumph for President Reagan, a landmark in the piecemeal destruction of New Deal philosophy and a potential boon to Republican candidates in the November elections.

Ironically, it also spotlights the dissent and political danger the president and his party face on fiscal and foreign policy issues.

Just a few hours before the Senate put its decisive stamp of approval on the massive restructuring of the tax system, which Reagan has designated as the top domestic priority of his second term, there were two jarring intrusions in the Senate Press Gallery.

One was the loudspeaker announcement that House and Senate conferees on the fiscal 1987 budget resolution had canceled their scheduled meeting -- a reminder of the deep political divisions over the higher defense spending and deeper domestic cuts Reagan is seeking and his flat opposition to higher revenues.

The other was the president's televised plea for aid to the "contras" in Nicaragua, which comes to a House vote today -- the latest round in a widening battle between Reagan and congressional Democrats over the control and direction of foreign policy.

The historical irony is that what seemed most radical in Reagan's original program -- his drive for deep cuts in tax rates -- has become the accepted political philosophy of both parties.

Even though Sen. Bill Bradley (D-N.J.) was the intellectual godfather of the flat-tax bill passed by the Senate and even though Chairman Dan Rostenkowski (D-Ill.) of the House Ways and Means Committee will try to put his party's imprint on the measure in the House-Senate conference, Reagan will be the chief political beneficiary, almost all observers agreed.

"I'm sorry our party didn't put it in our 1984 platform," said Sen. Gary Hart (D-Colo.), reflecting on Bradley's unsuccessful effort to sell the idea to Democratic nominee Walter F. Mondale. "But it got away from us, and it's theirs now," Hart added. Rostenkowski agreed that "the president will get most of the credit."

Reagan's decision to press for deep, across-the-board cuts in individual and corporate tax rates in 1981, even while he was starting an accelerated defense buildup, constituted what then-Senate Majority Leader Howard H. Baker Jr. (R-Tenn.) called "a riverboat gamble."

By their votes yesterday, such liberal senators as Hart, Edward M. Kennedy (D-Mass.) and Daniel Patrick Moynihan (D-N.Y.) endorsed the bet that Reagan is right in contending that slashing rates again to their lowest level in almost 50 years will spur the economy and benefit most Americans.

"He Reagan sure has set the agenda," Moynihan said.

The liberals justified their action on the grounds that higher taxes on corporations, the closing of many loopholes used by wealthy individuals and the reduction or elimination of taxes on many low-income families made this what Moynihan called "the most ethical event I've ever seen in this place."

But the driving force, they acknowledged, was the lure of lower rates -- a goal Reagan has pursued with passion since the late New Deal days when he found much of his movie salary siphoned off by high marginal tax rates.

From that day until this year, progressivity in taxes was a cardinal principle of liberals, and the abandonment of that principle was cited by Sen. Paul Simon (D-Ill.), one of yesterday's three dissenters, as the main reason for his opposition. The issue may be revived in conference by House Democrats, but the odds are against them.

Horace Busby, a business consultant who served on Lyndon B. Johnson's White House staff, said yesterday that "the progressive income tax was invented by Democrats to catch rich Republicans. It lost its political appeal when middle-class families between $15,000 and $50,000 a year came to pay 60 percent of the income tax." Busby saw yesterday's vote as a "historic signal" of a coming shift toward consumption taxes, "the end of reliance on the income tax as a principal source of revenue."

If that proves to be true, it will fulfill a long-cherished conservative dream. Short term, too, the political benefits figure to flow mainly to Reagan and the GOP. Sen. John Heinz (R-Pa.), chairman of the National Republican Senatorial Committee, called it "a plus for our incumbents across the board." Senate Finance Committee Chairman Bob Packwood (R-Ore.), who craved this victory after an unexpectedly tough primary in May, arranged for many of the other 17 Republican Senators running this year to showcase their televised efforts on tax issues vital to their states.

Republicans need the tax bill for bragging purposes, because on the other issues before Congress -- defense spending, aid to the contras, trade policy, arms control and even South African sanctions -- Democrats are confident they have public support for their challenge to Reagan's policies.

The president has won his way on taxes -- dramatically and perhaps historically. But in other policy areas, the struggle continues.