The gray market, which only last year was making U.S. distributors of foreign goods see red, has faded to a shadow of its former self as the declining dollar makes imports more expensive for consumers here.

"For Porsche, the gray market has literally gone away," John Cook, president of the U.S. sales subsidiary of the German auto maker, said last week in Detroit.

Few importers would put it as strongly as that, but there is widespread agreement that the problem has receded. And for importers, that is very good news.

An estimated $7 billion worth of discounted merchandise, ranging from luxury automobiles to crystal vases, was brought into this country last year through back channels. When the dollar hit record levels against the Japanese yen and the German mark, thousands of entrepreneurs -- not to mention a few established stores -- began buying products direct from the manufacturers or from foreign dealers and selling them to the American public, thus undercutting suggested U.S. retail prices by 40 percent or more.

Hurt by the competition and fearful of the effect discount selling would have on the carefully polished reputations of their luxury merchandise, authorized representatives sought to strike back at gray marketeers, without noticeable success.

Today, however, what they were unable to accomplish through the courts or legislatures, the marketplace is doing for them.

Since March of last year, the dollar has lost about 35 percent of its value against the yen and the mark and similar amounts against other major currencies. Although this has made goods from those countries somewhat more expensive, exporters -- some of whom never lowered their prices when the dollar was strong -- have not yet dared to raise their prices to the full extent of the dollar's slide. On the other hand, direct importers -- a designation gray marketeers prefer -- have felt the full brunt of currency fluctuations, which have resulted in decreased margins for them.

The effect has not been uniform, however, because of different price structures and other factors. Automobile importers have seen much more of a change than have perfume companies, for example. Interviews with authorized dealers and gray marketeers indicate that, in general, the discount market for lower-priced goods, on which the profit margin is slimmer, has been more affected than the top of the line.

John D. Clouse, a vice president with Nikon, a major Japanese camera maker, observed that, "While the gray market had lessened a great deal, it is still there."

A year ago, three out of every 10 Mercedes-Benz automobiles bought by Americans, or 35,504 cars, were imported directly, making it by far the hottest car on the gray market. Current import figures compiled by the government project that all gray market imports will drop from a record of 66,879 last year to 41,000.

The Automobile Importers Compliance Association, which represents the gray marketeers, projects an even lower total figure of 20,000 to 25,000. That means somewhere between 10,000 and 17,000 gray market Mercedes-Benz autos compared with the 90,000 cars Mercedes-Benz of North America Inc. plans to import in 1986.

Mercedes-Benz N.A. did not lower its prices when the dollar soared, supposedly to protect the resale value of its cars. Since then, it has raised prices 12 percent.

Gray marketeers, by contrast, have had to contend with higher prices from German dealers. But Benjamin R. Jackson, AICA's executive director, said that these dealers have large inventories bought before prices went up. Moreover, the smaller number of gray market imports has resulted in competition among the mechanics who modify German cars for the U.S. market and, consequently, lower conversion costs.

And the importers are never short of ingenuity. For example, some have discovered that German cars are still relatively cheap in Greece because the dollar has retained more of its value there. So instead of buying cars in Germany to bring here, these importers have taken to buying them in Greece.

Where once a customer could save 40 percent on a Mercedes bought through the gray market, the maximum is now 25 to 28 percent on top-of-the-line models.

Faced with declining imports and the possibility of restrictive legislation, the gray market car industry has experienced a "fairly major shakeout," according to Jackson, and is undergoing a restructuring, with marginal operators giving way to full-service businesses offering direct imports along with such options as leasing and used-car sales.

Unlike Mercedes-Benz N.A., Seiko Time Inc. lowered its prices for U.S. customers as the yen sank against the dollar. Still, gray marketeers captured 25 percent of the market, offering discounts of 30 to 40 percent on the Japanese timepieces. That differential remains now that prices already have risen 20 to 25 percent.

However, Seiko Time's president, Robert Pliskin, who says he'd be unhappy if just one watch in 10 were sold by direct importers, believes Seiko will recapture part of that market because bargain hunters will balk at the higher prices charged by gray marketeers.

Dan Rotta, president of Progress Trading Co., which has headquarters in midtown Manhattan, concludes the opposite: that customers will save more dollars by buying from him. "That makes the gray market more attractive than before," he added.

Nikon's Clouse claimed that direct imports of his product, which amounted to between 10 and 25 percent of sales -- solid numbers are hard to come by throughout the gray market -- have diminished because gray market prices have gone up about 15 to 25 percent, or more than the 13 percent raise imposed by authorized dealers. On the other hand, Charles of the Ritz, which markets French perfumes supplied by Yves St. Laurent in the United States, has seen no diminution in gray market imports. "Deals are made many months in advance, so it's too early to tell," said David Mosteller of Charles of the Ritz.

Waterford Crystal Inc. in New Jersey is another company that does not believe in cutting prices. Executive Vice President James Colleran declined to reveal how much crystal is sold at a discount, but admitted that the number of gray market retailers has actually increased even if their share of the total market has not.

Such is the prestige of the Irish crystal trademark that unauthorized U.S. sellers import Waterford by way of India, New Zealand, Guam, Latin America and the Caribbean, he said. Although one local outlet claims to offer a 30 percent discount on the retail price, Colleran contends that some stores sell it at cost. "They treat Waterford as a loss leader to get customers to buy other lines," he said.

Waterford has waged a particularly vigorous fight against discounting, employing tactics ranging from investigating and dropping dealers who discount, to raising prices in Europe by 15 to 25 percent to thwart U.S. wholesalers buying there. Colleran admits the latter strategy has had a negative impact on foreign sales.

Two years ago, 42 authorized dealers, including those already mentioned, formed an organization called the Coalition to Preserve the Integrity of American Trademarks (COPIAT). The group brought legal action against the government to stop the importation of trademark goods by the gray market without the permission of the trademark holders. COPIAT lost in the lower court but hopes to win on appeal.

Meanwhile, efforts on Capitol Hill to ban the gray market for cars have faltered, largely due to the Reagan administration's opposition to measures that would restrain free trade.

The House is still deadlocked, but the Senate is reported to have reached a compromise whereby the gray market could continue to function, provided it meets certain restrictions.