Secretary of State George Shultz proposed a bargain with Japan the other day--and the right kind of a bargain. It's time for Japan to open its markets wider, particularly for agricultural products and in government procurement. In anticipation of of greater access for American products, as Mr. Shultz put it, the Reagan administration will continue to oppose the protectionist legislation now before Congress.

Japan's barriers to imports are more important as politics than as economics. The difficulties in exporting certain categories of goods to Japan have become an issue almost to the point of obsession with several American industries. But the potential volumes of sales there are not large enough, by any reasonable estimate, to make any great difference in the balance of trade or to the Japanese economy as a whole.

These barriers are mostly traditions inherited from a time when Japan was less rich and a good deal less self-confident. Probably the least defensible of the agricultural policies is the one that keeps imports of meat down to a trickle and holds prices in Japan outrageously high. Among other things, it's an unjustifiable burden on Japanese consumers.

Japanese government procurement policy attracts attention because the issue here is chiefly high-technology equipment for the national telecommunications system. In the past, Japan kept most of this field closed to foreigners to keep its own manufacturers from being suffocated by the overwhelmingly strong American companies. But the Japanese industry is no longer an infant.

The Reagan administration and, for that matter, Congress as well have done pretty well on balance in the endless struggle to keep the American market open to all comers. The administration has made compromises, but some were hardly avoidable and most have been temporary. Congress has done a lot of shouting and ritual sword-waving, but most members are well aware of the damage that protectionist legislation inflicts. Unfortunately, it is very possible that moods can change over the coming year as American trade deficits get worse, unemployment stays high and elections get closer.

That is the prospect that concerns Mr. Shultz as well as a good many other people in Washington. And that is why Mr. Shultz proposed his bargain to the Japanese. He is aware that, under Prime Minister Yasuhiro Nakasone, Japan is enjoying stronger and more decisive government than it has had for many years. One of the attributes of a competent government is that it does not allow third-rate issues like beef and electronic switching gear to become intractable, inflammatory and disruptive.