In a high-stakes gamble that is being watched with interest by economists and money managers in this country, the British government has begun to issue long-term securities with interest rates indexed to the rate of inflation.

Two billion-pound bond issues on which the interest rate is 2 percent plus the rate of increase in Britain's general index of retail prices were sold to insurance companies and pension funds last spring. In September, the Bank of England also greatly expanded the market for its index-linked national savings certificates, making them available to individuals of any age instead of just to the elderly and also to some institutional buyers.

Though the indexed bonds were described officially as an experiment and constitute only a small portion of government borrowing, they may be part of a trend toward indexed securities in Britain. "It is expected that further issues of index-linked stock will be made in the future," a Bank of England statement said.

In issuing indexed bonds, the government created an attractive instrument for investors because it offered them a guaranteed yield insulated from inflation, analysts here said. But it created potential long-term problems for the battered national treasury, because if the inflation rate rises, the cost of repaying the borrowings could be very heavy.

In the second quarter of 1981, British prices rose at an annual rate of 19.6 percent, the highest rate in a year and a sharp increase over the 18 percent figure for all of 1980.

Brian Quinn, a spokesman for the Bank of England, said the purpose of the indexed instruments is to "tap savings held in the private sector" by inducing individuals and pension managers to invest in government issues. The indexed bonds can be held only by insurance companies and pension funds, so they have a minimal secondary market. There may be fewer restrictions on subsequent bonds. Quinn said the bank has begun a "widening process" of relying less on fixed-rate securities.

The first billion-pound bond issue was sold at par value, ensuring all subscribers a real return of 2 percent. The second issue, however, sold at a discount of 14 points, giving buyers a guaranteed real return of 2.8 percent for 25 years.

"Retirees and plan sponsors will benefit and no one will be harmed (except perhaps speculators) if the rate of inflation subsides," according to The Mercer Bulletin, a monthly newsletter published by the prominent actuarial and fund-management firm of William M. Mercer Inc. "But what if the rate of inflation does not reduce fast enough or if the government runs into financial difficulties?"

If the bonds represent a step toward a "fully indexed society," that "solves a good many problems, including labor disputes, but only temporarily . . . government financing is paid by future taxes. Increasing government payments require increasing taxes," the newsletter said.

Barnet Berin, who has followed the British developments for Mercer, said the British "are in a very precarious position. The tip-off was that the bonds sold at par the first time but at a discount the next time -- they're a terrific investment, but people wanted even more. They are going to have to meet those dividend payments, and there will be an ever increasing payout."

Barin said that if indexation of government securities becomes standard, it will undermine most other forms of long-term investment, such as stocks and corporate bonds, which already have been battered by steady inflation that makes them less attractive. "It's certainly going to be very upsetting to the people who sell stocks and bonds," Berin said.

According to Dallas Salisbury, director of the Employee Benefit Research Institute, which monitors trends in pension and benefit programs, the indexed bonds for pension funds amount to "a subsidy for one group within society, namely the elderly."

"If the British are guaranteeing 2-percent-plus inflation, they are hoping that over 20 years it will reduce the cost of money," he said. "But the only way you can come out ahead is if inflation drops so drastically that the rate would be less than on fixed-rate instruments."

Economists frequently have studied the potential implications of indexing some pension benefits in the United States, and "their conclusion, time after time, was that unanticipated inflation made it very expensive," he said.