PRIME MINISTER Masayohsi Ohira's current visit to the United States was intended to be a routine and ceremonial affair. It is the customary gesture of the newly installed head of a Japanese government. But inevitably the visit is turning up the volume of the tense and exasperated quarrel between the two countries over trade.

Last year the Japanese sold Americans $11.5 billion worth of goods more than they bought here. That's a lot of Toyotas and Sonys. Trade means jobs, and the complaints about Japanese imports are particularly audible in Congress. This trade inbalance is not a crisis, in the sense that it has to be resolved immediately. But neither is it tolerable indefinitely, for it is eroding trust and good will between two countries that are, after all, allies and each other's best overseas customers.

This gross imbalance of trade is the result of an American policy that worked too well-or, more accurately, worked well to long. In the wreckage after World War II, the United States set economic policies that gave Japan wide opportunities for rapid growth led by exports. The idea was to provide Japan with a stable and rising prosperity that would provide the base for a strong democratic tradition. That policy was a brilliant success, but Japan has out-grown it.

The United States, like most of the world's other trading nations, now wants Japan to reorganize its industrial strategy to balance its trade accounts. Theoretically, that change of direction promises great benefits to the Japanese people, since it means puting more of the country's resources into housing, environmental protection and the amenities of life. In practice, reorganizing a nation's economy is a disruptive and costly process, the venefits of which emerge only slowly. The Japanese say that they are moving as fast as they can. The Americans doubt it.

The Japanese counter by saying that American companies ought to try harder to sell their products in Japan. The Americans angrily reply that Japan's trading practices close much of its domestic market to outsiders. There's a good deal to both arguments. That's why the purchasing policies of the state telephone system have now become an issue. The amounts of money at stake are minor. But by refusing to let foreign firms bid on certain items, the government provides a concrete example of the closed market of which the Americans complain.

Where, ideally, should this week's conversations lead Mr. Ohira and his American hosts? Japan has a larger responsibility that it recognizes to balance its trade accounts. But on the American side, the Carter administration is going to have to give the Japanese more time. The threats, by Americans, of import sur-taxes and discriminatory trade barriers are dangerous and damaging. The United States remains the richest member of the world trading system and, if the system gets into trouble, the United States has the most to lose.