In a preelection bow to the farm belt, the Senate voted yesterday to block the Carter administration from further enforcing its nine-month-old embargo on grain shipments to the Soviet Union.

The action, an embarrassing slap at the administration, came only two days after President Carter narrowly survived another major Senate foreign-policy vote upholding his effort to continue nuclear fuel sales to India.

Yesterday's vote struck closer to home, right in the breadbasket, prompting farm state Democrats to join with most Republicans in voting to end the embargo Carter imposed in January in response to the Soviet invasion of Afghanistan.

"What is clear is that we are punishing ourselves, not the Soviets," said Sen. George McGovern (D.-S.D.), who joined several other farm state Democrats who are up for reelection this fall in voting to end the embargo, which has mainly affected feed grains.

Twitting the Democrats for having opposed embargoes generally in their party platform, Sen. Bob Dole (R-Kan.), also a candidate for reelection, called the grain embargo a disaster, and added: "It has had a severe impact on farm income. It has given other countries new markets to feed the Soviets. It has not had any real impact on meat production in the Soviet Union."

The White House reacted sharply to the rebuff, calling it a "clear mistake" and contending that the embargo has reduced Soviet meat production without reducing export sales by American farmers.

The Agriculture Department contends that Soviet meat production was down by as much as 15 percent in July from the previous July, and says that American grain prices are higher now than they were when the embargo was imposed.

"If you want to speak to someone who welcomes the vote, I suggest you speak to the spokesman at the Soviet Embassy," said presidential press secretary Jody Powell in reacting to the Senate vote.

The embargo ban, proposed by Sen. Larry Pressler (R-S.D.) as a rider to the appropriations bill for the Commerce, Justice and State departments, forbids use of any money in the measure for "enforcement or implementation" of any existing or future restrictions on agricultural exports to the Soviet Union -- presumably including government purchase of embargoed grain.

The Senate vote against the embargo does not necessarily mean it will end. In a series of votes in June, the House refused by big majorities to tamper with Carter's embargo actions and powers, indicating that it will probably refuse to go along with an embargo ban in a House-Senate conference on the issue. And a presidential veto is considered likely if the appropriations bill is passed by both houses with the anti-embargo rider.

In the Senate yesterday, pro-embargo Democrats appeared to have won on the first vote, which was 41 to 40 against Pressler's proposal. But their fragile margin fell apart in two subsequent procedural tallies as more anti-embargo senators turned up to vote. Apparently figuring they would lose on another recorded tally, the pro-embargo senators let Pressler's rider pass on a voice vote.

On the procedural vote, which was to reconsider the earlier 41-to-40 vote, the administration lost, 39 to 43. Eleven Democrats, mostly from grain-producing states, joined all but three Republicans in seeking another vote. The anti-embargo forces picked up four Republicans and lost McGovern, who was absent and not recorded on the reconsideration vote.

Washington-area senators split, with Charles McC. Mathias Jr. (R-Md.) and John Warner (R-Va.) voting against the embargo, while Sens. Paul S. Sarbanes (D-Md.) and Harry F. Byrd Jr. (Ind-Va.) voted to keep it. s

In debate, Sen. Adlai E. Stevenson (D-Ill.) said the embargo only "punishes the United States for the transgressions of the Russians," but contended that Congress would be compounding Carter's error by rescinding the embargo.

To do so, Stevenson said, would "signify U.S. resignation to the Russian invasion of Afghanistan" and "weaken our presidency already weakened by repeated congressional interventions in the conduct of foreign policy." He added, "one mistake does not deserve another."

Action on the appropriation bill as a whole was put off until next week, or perhaps later, because of a potentially time-consuming renewal of squabbling over antischool-busing language.