The Senate handed the administration a major victory yesterday, ignoring pleas from the influential milk industry and voting to cut the costly dairy price support program by about a fourth.

The adoption of a support-slashing amendment by Sen. Roger W. Jepsen (R-Iowa), after a day of heated debate, cleared away the biggest impediment to passage of a new four-year farm bill.

And as important as the victory was to the White House in its campaign to hold down costs of the farm bill--dairy supports are the largest part of the bill--it marked two other key developments.

For one, it was the worst legislative setback on record for a dairy lobby that ranks among the most affluent and politically powerful in Washington.

For another, on two different roll call votes yesterday, the Senate rejected the advice of its Agriculture Committee, whose members found themselves in growing disarray, at odds with each other over favorite commodity support programs.

Before the Senate can vote final passage, it must deal with more controversy: amendments to kill a proposed sugar program, to end the target price subsidies paid to grain and cotton farmers, and to phase out the peanut and tobacco acreage allotment systems.

The debate over the dairy section of the bill pitted Jepsen, uncle of a dairy farmer, against a fellow farm state Republican and committee member Rudy Boschwitz of Minnesota.

Boschwitz insisted that the Jepsen approach would severely reduce dairy farmers' incomes and deal many of them a death blow. Jepsen argued that unless cuts were made, producers would continue to jam federal warehouses with surplus milk.

Conflicting dollar figures were as abundant as the cheese and butter that now glut the warehouses, but the effect of the Jepsen amendment would be a saving of slightly more than $1 billion over the version adopted by the committee.

Preliminary estimates by the Department of Agriculture were that Jepsen's amendment would cost $3.56 billion over the next five years. The committee version authored by Boschwitz carried a $4.52 billion price tag.

Jepsen's plan, by those estimates, would even cost about $150 million less than the proposal offered by the administration last spring when the committee began drafting the legislation that will guide farm policy through fiscal 1985.

The Jepsen plan would break with the old system, under which the support price rose each year with inflation. It would retain the present support price of $13.10 per hundredweight of milk through the coming fiscal year, then authorize the secretary of agriculture to adjust it upward in each future year to keep pace with farm production costs but only so long as government milk purchases were less than $750 million.

Jepsen maintained that surplus production would slow only if Congress made it plain to dairymen that increased support prices were contingent upon their cooperation in helping reduce federal milk acquisitions.

Even with the waiver of the April 1 price support increase, adopted by Congress this year at the Reagan administration's urging, federal purchases of butter, cheese and nonfat dry milk have gone on at rates well ahead of 1980.

Cheese purchases, Jepsen said, are 150 percent ahead of last year, butter is up 50 percent and dry milk 30 percent.

Arguing that his proposal was fair to all producers, Jepsen said, "All I am trying to do is put some common sense into this."

Agriculture Secretary John R. Block had warned repeatedly that the farm bill faced certain veto by President Reagan unless Congress backed away from expensive dairy support approaches.

But Boschwitz and his allies, many of them Democrats, argued that the committee version and the several amending efforts made yesterday by Boschwitz represented important compromises and concessions.

Sen. Patrick J. Leahy (D-Vt.), echoing others' feelings, complained that the administration had made "a last-minute attempt to change all the work of the committee . . . making an attempt to balance the budget on the backs of dairy farmers."

Boschwitz' two efforts to pump up the dairy support were set aside by roll call votes on tabling motions offered by Sen. Robert J. Dole (R-Kan.) Dole won the first, 53 to 41; the second, 51 to 42.

Sen. Paul S. Sarbanes (D-Md.) voted with Boschwitz both times. All other Maryland and Virginia senators voted with Jepsen.