The Japanese government, on learning that Washington had spurned its latest concession in trade negotiations, met in emergency session Wednesday night and agree that it would give in no further.

Prime Minister Masayoshi Ohira emerged from the meeting to say that Japan has gone as far as it can in setting the trade dispute, which has developed because of Japan's massive balance of payments surplus.

The United States and the European Economic Community have insisted that Japan increase its imports and lower its trade surplus by letting companies sell machinery and equipment to its large public corporations that usually follow a "Buy Japan" policy.

In the past few days, Japan had agreed to open up bidding for about $7 billion worth of purchases to foreign suppliers.The proposal was spurned by the United States earlier Wednesday as insufficient.

The impasse creates a new strain in U.S. Japan relations on the eve of Ohira's visit to Washington next week and has left the Japanese irritated with what some officials regard as American intransigence.

"We will make no more compromises," Ohira was quoted as telling Japanese newsmen when the unusual late-evening meeting ended.

Cabinet leaders had insisted for weeks that the issue of government procurement had to be solved before the summit meeting with President Carter. Ohira had hoped to keep the summit discussions on a general level, leaving negotiations on specific trade issues to other officials.

Besides the money involved, which is considerable, U.S. officials have said they regard the issue an important symobolically as a test of the Japanese government's willingness to pressure domestic corporations to eliminate trade barriers. They contend that if the government is not willing to influence public corporations such as NTT to drop their barriers against foreign sales, it could not be expected to do much about purely private companies that do not buy abroad.

The deadlock reached in Washington was particularly focused on purchases by Nippon Telephone and Telegraph, a quasi-government corporation that currently buys only a tiny percentage of its supplies from foreign bidders.

NTT, which has considerable political clout, had bitterly resisted making any concessions that would open up for foreign bids its more sophisticated lines of switchboards and other equipment. It claims that valuable technological secrets would be revealed if it were forced to give specifications to foreign suppliers.

The Japanese proposal regarding NTT was rejected on Wednesday by Robert Strauss, the U.S. special trade representative, on grounds that it would not open up enough of the company's purchases of sophisticated switchboard and computerized equipment for foreign bids.

At a luncheon in Washington with reporters, Strauss said the negotiations with Japan have no produced concessions that he regards as a "two-way street" arrangement on trade.

Recent trade negotiations have provoked an unusual internal argument within the Japanese government. Top officials have been uncharacteristically blunt in conversations with American reporters, insisting that the U.S. demands are unreasonable and claiming that they amount to direct intervention in domestic affairs.

They have accused Strauss of pressing too hard and of being indifferent to the Ohira state visit next week.

In the Japanese parliament, Ohira was accused Wednesday of making too many concessions to the United States. A Socialist legislator, Hitoshi Kubo, said that it seems only Japan, is making any concessions.

One Japanese official Wednesday night blamed the deadlock on American negotiators, claiming that Japan had not been informed of the complete U.S. position until early this week when working level talks began in Washington. That delay, he asserted, made it difficult for Japan to prepare a satisfactory counter-offer in time to resolve the dispute before Ohira's visit. CAPTION: Picture, MASAYOSHI OHIRA . . . "no more compromises"