NEW YORK, FEB. 25 -- A wave of late selling wiped out strong early gains in the stock market today, leaving prices mostly lower at the close.

The Dow Jones average of 30 industrials, up about 27 points at its midsession high, closed with a 22.38 loss at 2017.57.

Declining issues outnumbered advances by more than 8 to 7 on the New York Stock Exchange. Big Board volume totaled 213.49 million shares, up from 212.73 million in the previous session. The NYSE's composite index lost 1.24 to 147.30.

Before the opening of trade, the Commerce Department said the nation's gross national product grew at a 4.5 percent annual rate, after adjustment for inflation, in the fourth quarter of last year. The department previously had estimated the pace of growth at 4.2 percent.

The upward revision was somewhat smaller than analysts had been expecting, however, and traders in both the stock and bond markets seemed uncertain how to respond.

The late drop meant that the Dow failed to close above the 2051.89 mark that it reached on Jan. 7, which was its highest close since the crash.

"It certainly looked good at one point," said Jim Andrews, vice president, institutional trading at Janney Montgomery Scott Inc. in Philadelphia. "But some small sell programs hit the floor, and that's all it took."

Andrews said it was "taking a lot of energy to keep the market up around current levels," and if it didn't begin to show signs that the levels were solid, "the market could be setting itself up for a pretty good flop."

Eastman Kodak led the active list, up 5/8 at 42. The company said it expects its 1988 earnings to be higher than recently published estimates by analysts.

Among other heavily traded blue chips, International Business Machines fell 1 5/8 to 114 1/2, General Electric 7/8 to 43, Ford Motor 7/8 to 44 1/4, American Express 5/8 to 25 3/8 and American Telephone & Telegraph 1/8 to 29 1/4.

Energy issues were mostly lower, pressured by falling oil prices. Amoco dropped 1 7/8 to 72 3/4, Mobil 1 1/8 to 42 3/4, Exxon 5/8 to 41 5/8, Chevron 5/8 to 43 1/8 and Atlantic Richfield 1 5/8 to 76 1/8.

On the other side of the coin, airline issues, which are sensitive to the fuel-price outlook, showed some gains. AMR rose 3/8 to 39, NWA 1/4 to 41 3/8, and Allegis 3/4 to 75 1/4.

Irving Bank jumped 3 to 53 1/2. The Bank of New York took a step toward carrying out its bid for Irving when it received the approval of the New York State Banking Board.

Compaq Computer rose 1 1/8 to 48 1/4. The stock was added to Standard & Poor's 500-stock composite index, prompting buying by so-called index funds set up to duplicate the performance of the 500.

Nationwide turnover in NYSE-listed issues, including trades in those stocks on regional exchanges and in the over-the-counter market, totaled 246.16 million shares.

Standard & Poor's index of 400 industrials fell 3.45 to 301.61, and S&P's 500-stock composite index was down 2.85 at 261.58.

The Nasdaq composite index for the over-the-counter market rose 0.48 to 363.62. At the American Stock Exchange, the market value index closed at 283.29, up 0.09.