A sudden, late afternoon buying spree unexpectedly sent stock prices soaring yesterday, driving the Dow Jones industrial average up a record 75.23 points.

It was the biggest one-day point gain in the history of the Dow. The average closed at 2568.05 points.

The 75.23 points represented slightly more than a 3 percent gain, the second-largest percentage rise in the Dow, after a 4.3 percent gain on Nov. 3, 1982.

The big gains yesterday were powered by a familiar combination of events: computerized buying programs, a stronger dollar and firmer bond prices. Oil stocks, a large component in the Dow average, were higher on worries about hostilities in the Persian Gulf.

Some traders said buyers also were encouraged by a report that showed the federal deficit had narrowed to $21.7 billion in August from $28 billion a year earlier.

The strong upward move ended a four-week stock market slide which, until yesterday's session, had trimmed 229 points, or 8 percent, off the Dow since Aug. 25. On that day, the Dow stood at an all-time high of 2722.42.

The biggest share of the Dow's gains came between 3 p.m. and 4 p.m. Earlier in the day, trading had been on the choppy, inconclusive side and resembled the action of recent sessions that ended in losses.

Winning stocks outran losers by nearly 2 to 1 on the New York Stock Exchange.

Volume on the Big Board totaled 209.5 million shares, against 170.07 million Monday.

The bellwether 30-year Treasury bond rose yesterday about 1 point, or $10 for each $1,000 in face value. The bond's yield dropped to 9.53 percent from 9.60 percent Monday.

Bond prices and interest rates move in opposite directions to adjust the prices of older bonds so that they remain competitive with newer issues.

Several analysts saw the market rally yesterday as a product of technical factors, including the large amounts of cash institutional investors accumulated as the market fell and the consequent efforts of money managers to invest that money and reorganize their portfolios before the end of the third quarter.

Some traders also thought the market's correction had run its course, analysts said.

At one point yesterday, the Dow was down about 10 percent from its all-time high, its deepest correction in several years. Thus the rally, the analysts said.

"It was the elastic band reaction. It was stretched to the limit, and it was a classical reversal," said Eugene Peroni Jr., market analyst for Janney Montgomery Scott in Philadelphia.

Peroni noted that the major gains were primarily in the blue-chip stocks that have been the focus of rising stock prices for many months. The blue chips were the most heavily hit in recent selling waves. Peroni said he foresees the Dow rising 600 to 800 points in the next four months.

Michael Metz, analyst for Oppenheimer & Co., New York, noted the Dow had been in negative territory in the morning, then moved into positive territory and got a boost of perhaps 30 points when the computerized buy programs kicked in during the early afternoon. The programs are part of a complex trading strategy involving both stocks and stock-index futures and are keyed to price disparities between the two markets.

The rising prices then set off a "mini-stampede" and an absence of sellers late in the day helped drive stock prices sharply higher, he said.

Metz said he expected the rally to end quickly. "Once the hot money is gone, the rally is going to fizzle," he said. One reason, he said, is that investors would find the interest rates in the bond market more attractive than stocks.

The best investors can expect, said Metz, is a market that trades in a Dow range of between 2500 and 2700.

The broad market averages reflected the Dow's advance. The NYSE index was up 4.23 at 178.48.

Standard & Poor's index of 400 industrials rose 10.78 to 373.14, and S&P's 500-stock composite index was up 8.96 to 319.50.

At the American Stock Exchange, the market value index rose 1.58 to 351.23. The Nasdaq composite index for the over-the-counter market closed at 437.90, up 1.89