Soviet Foreign Minister Andrel Gromyko, in a lengthy and unusually vitriolic speech, blamed the United States and its allies yesterday for escalating international tensions and charged that Washington is working out plains for a nuclear war in an atmosphere of "militarist frenzy."

Gromyko's address, his hardhest attack on the United States in the U.N. forum in many years, was reminiscent of the Soviet oratory during the cold war ear before the days of East-West detente.

The complications in the international situation during the last year have been caused by "a sharp turn in the policies of the U.S.A. and some other NATO countries," Gromyko charged. He attacked U.S. policy across a broad range of issues including Cuba, Africa, the Middle East, Southeast Asia and arms control.

In an apparent reference to Presidential Directive 59, which recently revised U.S. strategic targeting in case of nuclear war, Gromyko charged that "plans for such a war are being worked out and discussed [in the United States], and it is all being done at a government level."

The combative Soviet posture suggested that Thursday's scheduled meeting here between Gromyko and Secretary of State Edmund Muskie is not likely to do much to reverse the downward course of relations between the two superpowers.

The Soviet minister did seem to hint at acceptance of the U.S. plan, to be presented to him formally by Muskie Thursday, for preliminary talks starting next month on the limitation of medium-range missiles in Europe. Gromyko said his government is "not averse" to consulations and exchange of view on this topic, but immediately added that such talks should be "in good faith, and not just to kill time."

Gromyko qualified his statements by saying that the question of medium-range missiles is "in organic interrelation" with that of United States' "forward-based systems," and that the two should be considered concurrently.

The United States has resisted discussion of such forward systems, which include nuclear weapons carried by U.S. carrier-based aircraft off the European coast. It was unclear whether Gromyko was stating an established Soviet position for the record, or whether this will be a barrier to the discussions to be proposed by the United States.

The potential willingness to begin preliminary missile talks was just about the only conciliatory feature of Gromyko's 80-minute address. Muskie followed the text and listened to a running translation of the speech in the U.N. General Assembly chamber.

It was Gromyko's first appearance here since the Soviet invasion of Afghanistan last December and the condemnation of that action by a lopsided majority of the U.N. General Assembly Jan. 14. Gromyko's attack on U.S. policy appeared to be intended to shift the onus of Third World disapproval to the United States, perhaps on the theory that the best defense is a good offense.

Gromyko's claim that "some of our military units, by agreement with the Afghan government, have been brought back home," seemed intended to head off a new U.N. condemnation of Moscow's military operation in Afghanistan.

In recent discussion here, U.S. officials are reported to have reacted positively to attempts by Islamic nations to find a formula for a new U.N. resolution on Afghanistan. According to State Department sources, the United States has suggested four guidelines for any such resolution:

The objective should be withdrawal of Soviet forces from Afghanistan.

The Soviet-backed government of Babrak Karmal should not be given legitimacy.

The elimination of resistance force fighting against the Soviets should not be an objective.

The Afghan people should be granted a process by which they can express themselves on their own future.

Gromyko, in his speech, declared that "only gulible people can heed the assertions built on sand to the effect that the aggravation of the world situation has been caused by the temporary introduction of a limited Soviet military contingent into Afghanistan."

He insisted that Soviet intervention was undertaken "in response to repeated appeals" by the Afghan government and is in full accord with the United Nations Charter.