America is in the midst of--are you ready?--a grape glut.

Driven in part by the national thirst for wine and the fact that vineyards make nifty tax shelters, grape production has soared in recent years, and another near-record harvest is about to begin here in the San Joaquin Valley.

The vintners are full up, however. Afloat in wine surpluses, they have cut back on grape-purchase plans this year. Farmers whose grapes ordinarily go to wineries will be turning them into raisins. But the U.S. raisin market may be withering, in part because of foreign competition.

The result, predictably, is sour grapes.

The grape-lock has the industry here blaming almost everyone but itself for producing more fruit than a cookie-loving, jelly-craving America can consume.

In particular it is blaming producers abroad, plus U.S. open trade policies that encourage wine imports even as the European Common Market wrinkles up and favors Turkish over American raisins.

This protectionist strain is so strong that Reps. Tony Coelho (D-Calif.) and William M. Thomas (R-Calif.) last week were able to line up 332 co-sponsors in the 435-member House on a trade bill aimed at opening foreign markets to U.S. wines. Hearings on the measure by the Ways and Means Committee are expected, a Coelho aide said.

The legislation was distilled and decanted by the Wine Institute, which represents 466 California wineries and wants to open markets abroad by threatening wine exporting countries with the same tariffs and duties they place on U.S. wines. "We're completely frustrated," said Arthur Silverman, the institute's man in Washington.

"A lot of our people wanted a ban on the importation of subsidized wines, but we didn't go with that. Historically, there has been an imbalance--more imports than we sell overseas. But our inability to export is partly due to high duties abroad and nontariff trade barriers. The legislation is a reciprocity bill that would deal with the issue country by country."

Last year, 122 million gallons of foreign wines valued at $781 million came into the United States. U.S. winemakers exported 9 million gallons (half of it to Canada) worth $38 million.

Department of Agriculture experts in Washington agree that external influences are affecting the U.S. grape situation, but they also point to the steady increase in California grape acreage in the last decade--from 455,000 acres to 620,000 last year--as a major factor in the oversupply of grapes.

Doyle Johnson, a marketing specialist at the USDA, said forecasts indicate that an estimated 5.4 million tons of grapes will be harvested from 649,600 acres this year, a 5 percent increase in bearing acreage since 1982.

"I just wouldn't put the blame for the problem entirely on wine imports," Johnson said.

Berge Bulbulian is one Fresno County farmer who blames inexpensive imported wines and subsidized foreign raisins for the threat to the 150 acres of grapes he grows near the town of Sanger.

But he is rankled just as much over federal agricultural and investment-tax policies that he thinks have abetted overproduction.

"Vineyards are a good place to take a tax loss," he said, "and we're seeing an influx of outside money into our industry . . . . Tax shelter people plant large acreages, then take their depreciation, and they don't care about price of the grape. It's not their daily bread that is involved. For us, it's different, and it's painful."

The raisin makers are just as frustrated as the wine makers. Kalem H. Barserian, general manager of the Raisin Bargaining Association, a cooperative that represents nearly half of the state's 5,500 raisin farmers, is worrying about where all of this year's surplus will go.

"Look," he said, "we've got serious trouble. The housewife in New York can get along without us. Who needs raisins? Well, we've got a real selling job to do, but there are problems. We've lost our Scandinavian market in the last 12 months; cheap Turkish raisins going into the European Common Market are hurting us.

"We get no government subsidy. We only have a federal marketing order to regulate supplies," Barserian added. "If you take away those tools, you can scratch this industry. You'll be buying Turkish raisins."

Meanwhile, out in the lush vineyards that surround Fresno, the worries are more immediate: how to deal with the burgeoning bunches of fruit that will start being harvested at the end of the month.

"The grape situation is mind-boggling," said Irwin Efird, who, with three sons, raises about 300 acres of grapes south of here. With their wine-grape market shut off--their usual winery customer said there would be no deal this year--their grapes will become raisins but the Efirds are not sure when or how they will be sold.

"Our industry is looking at a two-year oversupply of raisins right now," added Russell Efird, one of his sons. "We're looking at 400,000 tons of raisins this year, compared to the 230,000 we might have anticipated. If they're not sold, they'll go into a reserve but it might be years before we get paid."

Berge Bulbulian is in the same boat. His contract with a major winery was canceled and his prime wine grapes will become raisins, maybe to be sold soon, maybe not.

"You know," he said, "I don't want to end wine imports, but something has to give . . . . We flood Washington with letters on the raisin problem and we hear nothing. President Reagan gives us a scare; Office of Management and Budget Director David Stockman wants to end our marketing order. It would be a disaster. USDA says wine and raisins are a piddling thing when compared to soybean exports. You know, it seems there's a desk for every country at the State Department except the United States."