he commander of Warsaw Pact forces, Soviet Marshal Viktor Kulikov, made a fierce attack on President Reagan's defense policy today and warned that U.S. plans to gain strategic superiority over the Soviet Union "can play the role of a detonator in the current explosive situation."

In a sharp escalation of rhetoric, Kulikov spoke ominously about "gathering clouds of war danger on the horizon" and asserted that "large-scale military preparations" by NATO countries "compel" Moscow and its allies "to pay the unremitting attention" to their defense establishments to be able "to rebuff any aggression."

Kulikov's article in the Defense Ministry newspaper Red Star coincided with the opening in Prague today of a meeting of Warsaw Pact foreign ministers. It presumably was designed to give visibility to Moscow's behind-the-scenes efforts to prod its allies to boost their military spending.

But the marshal disclosed that the Warsaw Pact leaders at their January summit in Prague already have "taken decisions to further strengthen the defense capability" of all member countries.

Kulikov said the Warsaw Pact, "forced" by an escalation of military preparations by NATO, is "undertaking additional measures." He did not provide any details. There was speculation in diplomatic circles here that the current visit to East Germany of Marshal Dmitri Ustinov, the Soviet defense minister, is linked to some additional Warsaw Pact moves, possibly including the introduction of new Soviet arms into East Germany.

Speaking to East German soldiers today, Ustinov was quoted by the news agency Tass as saying that the planned deployment of new U.S. medium-range nuclear missiles in Western Europe would make NATO countries "hostages" of Washington's nuclear strategy.

Ustinov said that if the Soviet Union were attacked by these weapons, it would retaliate against both Western Europe and the United States.

"This return strike may turn out to be the final one for most of the Western European countries in which American nuclear weapons are to be deployed. This should always be remembered by the governments of the western countries," he said, adding that "the United States will not go unpunished" in such a case.

"If in Washington they think that we will retaliate only against targets in Western Europe if Pershings and cruise missiles are used, they badly delude themselves. Retaliation against the United States will be ineluctable."

Ustinov's statement did not break any new ground, but it was more explicit than previous public remarks by top Soviet officials.

The tone and contents of Kulikov's article mark a distinct change in Moscow's public position and underscore the impression that the Russians are well under way in their preparations to counter Reagan's challenge.

Kulikov assailed the Reagan administration for "inventing new options as to the best way to unleash a nuclear war in the hope of winning it."

He said the "arms race in the United States and some other NATO countries is acquiring an ever wider scope and is being transformed into a qualitatively new and far more dangerous phase." He said the United States has undertaken "particularly accelerating steps" to develop its offensive strategic forces, and "first of all its first strike nuclear means" in an effort to achieve superiority.

"The calculation of the imperialist militaristic circles that they will be able to reverse the course of history and to roll back or even destroy socialism after gaining military superiority over it the Warsaw Pact are nothing more than an illusion--but the illusion which is extremely dangerous. It can play a role of detonator in the current explosive situation.

"No matter what new weapons should appear in the United States and NATO countries , and no matter in what quantities, the Soviet armed forces will have a reliable counterbalance to these weapons," Kulikov said.

Kulikov said that statements by Reagan and other unspecified NATO officials have led Moscow to conclude that the western military buildup was going ahead and that "everything is subjugated to the striving to ensure military superiority over the Soviet Union and its allies so as to establish domination over the course of world events."

He analyzed Reagan's plans for new weapons systems that, according to Kulikov, would increase "by no less than 50 percent the capability of the U.S. strategic offensive forces for nuclear ammunition delivery at one launch in the current decade."

Kulikov said the planned deployment in Western Europe of new American medium-range nuclear missiles would "disrupt" the "existing military parity in Europe" as well as "the rough balance of the strategic forces" of the Soviet Union and the United States. He said that the deployment "would undermine international stability" and "encourage even more" Washington's "aggressive aspirations."

Kulikov repeatedly referred to a "greater unity" of the Warsaw Pact nations and their successful efforts to increase their defense potential.

Political observers here said Kulikov's article suggested that the Soviet high command now believes that the United States will go ahead with the deployment of 572 Pershing II and cruise missiles, scheduled to begin in December, and that it is viewing this prospect with greater alarm.