SAN DIEGO (AP) _ The Navy is investigating bills from Grumman Aerospace Corp. to determine why it was charged $660 each for two aircraft ashtrays and $400 each for two socket wrenches.

The costs of the parts, manufactured by Grumman, were revealed during an inspection this month, said Cmdr. Tom Jurkowsky, spokesman for the Pacific Fleet Naval Air Force.

The inspection showed that Grumman charged the Navy $660 each for two aircraft ashtrays purchased in February 1983, Jurkowsky said. In June 1984, the inspection showed the Navy paid more than $400 each for two socket wrenches.

The same inspection revealed the price of a ground lock, also manufactured by Grumman, increased in price nearly 2,700 percent in just over a year, he said. In April 1982, the price for the clamping device was $102, and in June 1983 it cost $2,710, Jurkowsky said.

Jurkowsky said it is not known how many of the ground locks were purchased over what period of time, and said the Navy ordered an investigation to determine the causes of the extreme price fluctuations.

''The Navy has also directed its 'price-fighters' team to do a 'should-cost study' of the ashtray, socket wrench and ground lock. This review will determine from a technical point of view what the cost value of these items is or should have been,'' he said.

''There is no excuse for paying $659 for an ash tray,'' Pentagon spokesman Michael Burch said Tuesday on behalf of Defense Secretary Caspar Weinberger.

''The practices which led to this gross overpricing were found during a Navy inspection. The Navy will not let the payment stand. An immediate refund will be obtained or the amount will be withheld from progress payments. We will only pay an amount that bears a reasonable relationship to the true value of any item.''

Burch said the Navy officers who authorized the purchases would be disciplined and possibly dismissed.

A security guard at Grumman's headquarters in Bethpage, N.Y., said Tuesday evening by telephone that company offices were closed for the day and that a company spokesman would not be available for comment until Wednesday morning. The guard declined to be identified.

Jurkowsky said the Miramar Naval Air Station in San Diego has previously challenged Grumman on prices charged for about 20 other items recently purchased.

The company admitted making a mistake on one item and refunded the Navy more than $200, and the other items are still being reviewed by Grumman, Jurkowsky said.