The United States and its European allies are moving toward a joint policy on economic and security dealings with the Soviet Union that would skirt the stubborn and divisive issue of the Reagan administration's gas-pipeline sanctions.

The movement away from confrontation over the Soviet pipeline is partly the result of some deft diplomacy and partly a bit of luck resulting from a meeting scheduled many months ago, when the U.S.-European alliance was troubled about the pipeline but not yet at loggerheads.

President Reagan made no mention of the pipeline in his radio remarks on Poland yesterday, and administration spokesmen limited themselves to saying that nothing had changed on the sanctions.

Instead, the emphasis was on consultation and cooperation with the allies, a process in which the United States now has new leverage as a result of Poland's banning of the Solidarity trade union. It is leverage that could be telling, according to long-time observers of the alliance, as long as it is not used on the pipeline issue itself, where neither Reagan nor his European counterparts appear to have any political room for maneuver.

The first sign of a change came in the agreement by NATO foreign ministers in Canada last weekend to establish guideposts for strategic consequences of East-West trade. This was followed by a successful meeting of the Western group that monitors high-technology trade with the Warsaw Pact countries, according to Reagan administration sources. Further progress could go far toward meeting the administration's criteria for lifting sanctions against companies that ship parts to Moscow for the Soviet gas pipeline to western Europe, officials indicate.

The Reagan administration on the one hand and the governments of France, Britain, Italy and West Germany on the other remain absolutely unyielding on the pipeline itself, however, and profound differences remain over the relative importance of trade both to the Soviet Union and to the West.

European and American diplomats in Canada and at the United Nations cautioned that these differences could reemerge at any time to derail the effort to skirt the pipeline issue.

European diplomats credit Secretary of State George P. Shultz with moving to break the impasse when the Europeans failed to reach a common position with which to approach Washington.

"There was a perceptible change in climate that began during talks between Shultz and the other foreign ministers in New York and which seems to have carried over to Canada," a European diplomat noted.

Among the Europeans there appears a general belief that Shultz will prevail in the administration policy making -- a belief based in great part on European perceptions of Shultz' approach to the problems of the alliance and on his style of working in the administration.

With the alliance careening toward political schism over the sanctions, the meeting in Canada, in essence, forced a decision, according to one participant. To have departed Canada without some accord would have left a clear impression of a dangerous split.

The meeting had not been intended for that when it was first broached several months ago by Italian Foreign Minister Emilio Colombo. Then, it was designed as an occasion for the ministers to meet alone, without aides or the glare of press coverage, for casual discussions.

"When the proposal was made, differences and misunderstandings were endemic in the alliance, but we didn't have the explosion of problems we have at present--interest rates, steel, agriculture and the unilateral U.S. sanctions," a European participant noted.

The tensions caused by that "explosion" spilled over into the initial afternoon session at a rustic lodge in the Laurentian mountains north of Montreal.

"There was mistrust, uncertainty. Despite the bilateral meetings in New York we were testing one another out," the European official said.

Then, at dinner Saturday and during Sunday talks, the dam broke and discussions quickly moved to the pipeline sanctions, although the language was more general.

"There was a very basic point: should security policy be only military or should it be something more? Should a global policy also be an economic one? That was the key point, the essential question," the official said.

"So far, a discussion which had been hasty or polemical -- on the pipeline, or agriculture -- had not brought any consensus. These discussions brought to the fore agreement that a global security policy must include the economic issues."

This broadly phrased agreement was translated into studies--actually intended as working policy papers -- of major components of the trade issue: energy dependence, credits, agriculture, general trade levels, high-technology goods with military application, and even some high-technology items which are not translatable into military usage but nevertheless strengthen the Soviet Union militarily if there are no limitations.

French Foreign Minister Claude Cheysson, while railing against the Reagan administration sanctions policies, welcomed the agreement as "a context that could help alleviate pipeline problems."

France traditionally has fought the separate security and trade questions and officials close to Cheysson drew a sharp distinction between the concepts as the Canada meeting drew to a close.

"If the object is to look at these exigencies under the security angle, that is okay, but not to define a philosophy of East-West relations. We want to remain independent, but we can decide principles. We recognize security has strategic and economic aspects," an official said.

U.S. officials said there was significantly increased receptivity to Washington's arguments for tighter controls on electronic items and in the area of industrial espionage. "This won't be done overnight," one official noted, "but there was practically no mention of sanctions. That's a tremendous thing. It shows we can separate the issues."

Whether this is a harbinger of other aspects of the Canadian decision remains to be seen.

At the core of the dispute is a fundamental disagreement over the importance to the Soviet Union of western credits, technology and commodities. This appears unchanged by the Canadian meetings and points toward continuing problems.

The Reagan administration argues that western credits and technology make it easier for Moscow to increase the capacity of its military machine, either by direct imports or by using western technology in a non-military sector, thereby freeing Soviet expertise and resources for the military.

By cutting back the credits and technology, it is argued, Moscow will be forced to reallocate its own increasingly scarce resources and even rethink its foreign policy and domestic political priorities.

European experts counter by saying western imports represent only about 1.5 percent of Soviet gross national product, and an increasingly large portion of that is grain from the United States.

European diplomats remain unreconciled to the Reagan sanctions policy and characterize it as "absurd," "foolish" and "doomed to failure."

Nevertheless, the Europeans recognize that the sanctions policy is, in the words of a U.S. diplomat, a "very flexible tool," and they indicate that the broader policy reviews launched in Canada can make progress as long as the administration applies the least painful version of the sanctions policy.

The recent loss of a $3 million contract by Dresser-France, the French subsidiary of Dallas-based Dresser Industries, due to the sanctions is known to have reinforced the view that cooperation on development of a general framework for East-West trade, as sought by the administration, might be useful. This, accompanied by Shultz's low-key approach, is said by European diplomats to have contributed to the outcome in Canada.

But doubts remain, among European and American diplomats, whether that spirit will lead to more concrete agreements that could, in turn, convince the administration to alter its pipeline policy.