All the talk about reviving inflation these days has provided little comfort to advocates of gold investments.

The price of gold, which is supposed to thrive on inflationary worries, has instead been slumping, hitting 21/2-year lows this month.Hovering lately around $380 an ounce, it is down more than 20 percent from its early-1988 high near $500 and off about 7 percent since just the beginning of 1989.

Even news of a bigger-than-expected 1 percent jump in the producer price index of finished goods for January failed to stir gold out of its doldrums.

In a strange twist, analysts attribute the weakness in gold to the alarms sounded about the dangers of inflation by such prominent observers as Alan Greenspan, chairman of the Federal Reserve.

"Recent upward pressure on the producer price index points to a modest pickup in the inflation rate during coming months," say economists at Merrill Lynch.

"But the behavior of gold prices underlines confidence in the inflation-fighting resolve of the Fed and a belief that inflation pressures will ultimately be contained."

Or as the Value Line Survey put it in its latest quarterly appraisal of gold-mining stocks, "the continued assertions by Chairman Greenspan that inflation in the United States is too high sends a bearish signal to gold markets.

"The concomitant increase in short-term interest rates that the Fed has orchestrated serves, meanwhile, to shore up the dollar, placing further downward pressure on bullion quotations."

Yields at or near 9 percent on virtually riskless investments such as Treasury bills represent stiff competition for gold investments, which pay no current return in most of their various forms.

Dividend yields in the 9 percent range can be had in the American depositary receipts of some South African mining companies, which trade like stocks and can be obtained through just about any broker.

However, these stocks are under a cloud because of controversy over South Africa's political policies, in particular apartheid.

On top of that, high interest rates increase the cost of carrying gold on credit, as many dealers and other businesses do.

Other, separate reasons have been advanced for gold's slump. The Soviet Union, which ranks behind only South Africa among the biggest gold producers of the world, is said to have been selling gold in large amounts lately.

Reports from gold-trading centers in Europe suggest that these sales are likely to continue as the Soviets seek to upgrade their industrial production base under the restructuring effort known as perestroika.

All in all, gold's glory days when it soared above $800 an ounce at the start of the 1980s seem long past.

Yet there is a vocal camp of analysts and advisers who still recommend devoting at least a small fraction of one's assets to gold as insurance, if nothing else, against future inflationary outbreaks.

Some argue that gold could enjoy a nice rally if for any reason policymakers such as Greenspan find it tougher than expected to keep inflation in check.

"We are not turning into gold bugs," says James Stack, editor of the advisory letter InvesTech Market Analyst, but recent stirrings in inflation "could point toward substantial gains in gold and gold stocks in the months ahead."

"Don't look for gold stocks to immediately soar," he cautions. "Most investors firmly believe that inflation will fade after this latest increase in short-term interest rates. It'll take a while to shake that confidence."