MOSCOW, JULY 21 -- The Soviet Union is prepared to meet the United States "in any forum" for talks to resolve the rising tensions in the Persian Gulf, Mikhail Gorbachev has told President Reagan.

In a letter to Reagan, however, the Kremlin leader charged that the U.S. naval build-up in the gulf is one of two causes of those tensions in the region, an official Soviet spokesman said here today.

Gorbachev identified the Iran-Iraq war as the other cause but indicated that the Soviet Union is not ready to support sanctions against the two warring parties.

Instead, Moscow stresses the importance of the new United Nations resolution calling for an end to the war and the U.N. secretary general's responsibility to enforce it, Foreign Ministry spokesman Boris Pyadyshev said at a press briefing today.

U.S.-Soviet tensions involving the Persian Gulf have mounted since spring, when both Moscow and Washington pledged to protect Kuwaiti oil tankers from attack in the "tanker war" between Iran and Iraq.

Gorbachev was responding to a letter Reagan sent him early this month in which the U.S. president asked for Moscow's cooperation to bring an end to the gulf crisis, Pyadyshev said.

{In Washington, White House spokesman Marlin Fitzwater told reporters the administration believes that the U.N. Security Council is "the proper forum" for discussing the gulf conflict.}

According to the contents of the two letters, revealed for the first time here today, Gorbachev and Reagan gave differing analyses of the tensions in the gulf but expressed interest in joint cooperation to settle it.

In Reagan's letter, he "laid out points about the development of the situation in the Middle East and the gulf region," Pyadyshev said.

In his response, Gorbachev "gave his own opinion and analysis," identifying the "build-up of naval forces between the United States and the Persian Gulf" as a main source of tension, Pyadyshev added.

Asked for the Soviet response to the U.S. decision to give naval escorts to reflagged Kuwaiti ships traveling through the gulf, Pyadyshev reiterated a Soviet offer to withdraw its own military vessels if the United States, Britain and France did likewise. The Soviet Union reportedly has three minesweepers and a frigate in the gulf.

Pyadyshev criticized the recent addition of U.S. ships to the gulf region. Such a build-up "cannot solve the problem militarily," he said.

"Things would be very much facilitated," he said, "if the U.S. accepted the Soviet proposal to the effect that all military battleships be removed from the gulf area belonging to states outside the gulf area."

Moscow and Washington also appear to differ over a U.N. Security Council resolution passed yesterday demanding that Iran and Iraq stop their seven-year-old military conflict. The resolution does not specify sanctions to be imposed on either side for noncompliance.

Emphasizing that the resolution is "very important," Pyadyshev said that Moscow gives priority to "the peace-building role of the {U.N.} secretary general, who has received a special mandate," to enforce the council's decision.

"As for the future resolution regarding sanctions," Pyadyshev said, " . . . everything will depend on the implementation of the first resolution," which was the result of six months of intensive diplomatic efforts led by U.N. Secretary General Javier Perez de Cuellar.

"Our country is ready to help in every way the peace-keeping function of the secretary general," Gorbachev said in his letter to Reagan.

Despite the apparent differences, both Reagan and Gorbachev used their letters to express interest in U.S.-Soviet cooperation to ease tensions in the gulf.

Pyadyshev noted that "some statements by the U.S. administration would also have us believe that the American side has an interest in looking into Soviet proposals concerning the Persian Gulf."

Gorbachev's letter also stressed "that he shares the view that is contained in the end of President Reagan's message that when the two countries are resolved to act together, the results are promptly there."