Iraqi President Saddam Hussein, here on a previously unannounced visit, met today with Soviet leader Mikhail Gorbachev amid signs that Iraq was seeking to assure support here.

Saddam Hussein has not visited the Soviet Union since he launched his war with Iran on Sept. 22, 1980.

The Iraqi president was accompanied by Foreign Minister Tariq Aziz and Abdul Jabbar Halil Shankshal, the minister for military affairs. Soviet Defense Minister Sergei Sokolov was among those at a first round of talks, indicating Soviet military aid was discussed. Moscow is Iraq's main arms supplier.

The official Soviet news agency Tass described the ongoing talks as "businesslike, frank and friendly" and specified that the Iraqi came "at the invitation of the Soviet leadership."

In a report on longer talks between the Iraqi president and Soviet President Andrei Gromyko, Tass said, "The situation in the Middle and Near East was discussed . . . from the standpoint of the need to remove the causes behind the unresolved Middle East problem and the continuing Iran-Iraq armed conflict." In a speech at a Kremlin dinner tonight, Gromyko reiterated the Soviet view that the war is "unneeded and senseless."

The war "benefits only those who are interested in weakening Iraq and Iran," Gromyko said, denouncing those who "view it as a means of settling accounts."

Gromyko was quoted as stressing "the identity of the views held by the Soviet Union and Iraq on many issues of foreign policy" as proof "of the fact that our relations have good prospects for further development."

The Soviet Union has maintained public neutrality in the Iraq-Iran conflict while continuing to supply Iraq's arms. It has also extended credits, reportedly to cover reduction in Iraqi oil production due to the war.

The war, with staggering cost in human life on both sides, is perceived here as a threat to the region's stability and to the balance the Soviets try to maintain among their Middle Eastern allies.

Iraq, which was one of the first countries to sign a treaty of friendship and cooperation with Moscow, is a longtime rival of Syria, to which Moscow is also heavily committed. Syria and Libya, another longtime Soviet ally, have backed Iran in the war.

Libyan leader Muammar Qaddafi was in Moscow for a state visit in October. Some specialists speculated that Saddam Hussein would raise with the Soviets reports that Libya has forwarded Soviet-supplied arms to Iran.

Tass, in reporting the Iraqi's talks with Gromyko, said the Soviet side stressed its opposition to any separate deals with Israel, and on the need for Arab unity.

The Tass account also noted "the urgent need to overcome as soon as possible differences in the Palestine resistance movement and to restore the unity of the Palestine Liberation Organization on a principled anti-imperialist basis."

Splits in the PLO ranks have been a sore subject in Soviet-Syrian relations in recent years, as Moscow has tried to keep Damascus from backing factions opposed to PLO leader Yasser Arafat.