Senate Republicans won an important test vote on President Reagan's budget-cutting program yesterday as Democrats failed, 56 to 44, in an attempt to restore nearly $300 million for politically popular veterans' health programs.

As the Senate opened debate on proposals for $36.4 billion worth of spending cuts for next year, both the Republican majority and Democratic minority viewed the veterans' proposal as the Democrats' best shot for a major change in the Reagan program.

"That was the toughest vote we've had this year," claimed Senate Majority Leader Howard H. Baker Jr. (R-Tenn.) in jubilant tones after the vote, "and I suspect the toughest vote in the [whole] budget battle."

Not only did the Democrats fail on the big vote but they failed by a similar margin, 55 to 44, in a later effort to restore the smaller sum of $104 million for veterans' programs.

Democrats pulled out all the emotional stops in arguing for restoration of about three-quarters of the $407 billion that the Senate Budget Committee had proposed to cut from programs under the jurisdiction of congressional veterans' committees. The committee had adopted all of Reagan's proposals except for elimination of storefront counseling centers for Vietnam-era veterans, which the committee proposed to continue funding at a cost of $25 million.

"We'll find out today who's with us [the veterans] and who isn't," declared Sen. Donald W. Riegle Jr. (D-Mich.). The Reagan proposal is the "first step toward dismantling" the independent health care network for veterans, charged Sen. Dennis DeConcini (D-Ariz.).

But the Republicans had their version of drama, too. Sen. Strom Thurmond (R-S.C.), who yields to none in his advocacy of benefits for veterans, spoke out for the cuts, saying, "If we don't go after these pet projects, we never will get [budget] reductions."

"This is the first opportunity to decide whether we're serious" about cutting the budget, declared Senate Budget Committee Chairman Pete V. Domenici (R-N.M.), describing the cuts proposed for veterans as "just a pinch" compared to far bigger cuts in programs such as education and general social services. Then a word for the nervous: "I submit the veterans aren't going to the polls and throw anyone out because of this vote."

While Baker and other Republicans predicted that they will hold the line on the overall total of spending cuts, Baker indicated flexibility yesterday in suggesting that he may support some social program increases if they are coupled with offsetting spending decreases in other areas. He mentioned such areas as veterans' benefits, school lunches and Medicare and Medicaid programs as well as Export-Import Bank funding, which he said would help create more jobs in American exporting industries.

A group of Republican moderates led by Sen. John H. Chafee (R-R.I.) plans to introduce a proposal today to increase spending by $1 billion or more for an array of social programs, including education, fuel assistance for the poor, preventive medical services and urban development grants. Their chances may well be better than those of the divided Democratic minority.

The Democrats' main proposal for veterans would have added $295 million to Reagan's proposed spending for veterans' benefits (and $270 million to the spending total approved by the Budget Committee). The vote was basically a party-line one, with Republican Lowell P. Weicker Jr. (Conn.) joining the Democrats and Democrats J. Bennett Johnston (La.), William Proxmire (Wis.) and Sam Nunn (Ga.) joining the Republicans.

It wasn't the Democrats' only loss of the day.

Demonstrating their support for spending retrenchment as well as budget add-ons, most Democrats rallied behind a proposal by Sen. David Pryor (D-Ark.) to impose a $2 billion across-the-board cut in procurement of supplies by all federal agencies. Charging that the government is "wasting billions of taxpayer dollars in our purchasing," Pryor contended that the cut "won't cause one child to go hungry at lunchtime or one veteran to go without a hospital room."

But Pryor also lost, 65 to 35, with 14 Democrats refusing to go along with his proposed procurement cut. The Republicans lost only two votes on that one.

Senate leaders are hoping to complete action next week on the resolution, which instructs congressional committees to cut programs within their jurisdiction by specific dollar amounts, leaving details of the cuts to the committees. The House, where Democratic chances are viewed as better, expects to act on the proposals next month.