MOSCOW, JULY 15 -- The Soviet Union and West Germany have narrowed differences on the issue of a united Germany's membership in NATO, President Mikhail Gorbachev said here today, but he indicated that several wrinkles remain to be ironed out before reunification of East and West Germany.

Gorbachev and West German Chancellor Helmut Kohl held three hours of talks, which Bonn officials said focused on what Germany's military status would be after reunification.

"We have moved a little toward each other," Gorbachev told reporters. "We have tackled some important issues. We've got a few small nuts to crack, but we have very good teeth." In 1985, as Gorbachev rose to power, foreign minister Andrei Gromyko described him as having "a nice smile but teeth of iron."

Kohl, who arrived in Moscow Saturday night for a two-day visit, agreed with Gorbachev's assessment but declined to give details. Throughout a 30-minute press conference in a guest house where the morning session took place, Kohl smiled broadly. "The talks are being held in an excellent atmosphere," he said.

Moscow has adamantly opposed a united Germany becoming a full partner in the North Atlantic Treaty Organization, composed of Canada, the United States and 14 West European countries. Whereas on Saturday, Foreign Ministry spokesman Gennadi Gerasimov deflected questions on the issue, following today's talks he told reporters he expected an agreement to be reached on it.

Today's session was the first round of what are expected to be intensive talks. Foreign Minister Eduard Shevardnadze and his West German counterpart, Hans-Dietrich Genscher, participated. The West German leader's visit coincides with one by Manfred Woerner, secretary general of NATO and former Bonn defense minister.

While declining to give details of today's talks, West German diplomats said Moscow's pending request for aid from the West and Gorbachev's recent victory over Kremlin conservatives may have helped soften the Soviet opposition to a united Germany's inclusion in NATO.

Last week, Gorbachev sent an appeal for financial assistance to leaders of seven major industrial countries, including West Germany, who had convened in Houston. The response was mixed, with the Bonn government reacting positively. The presence of Soviet and West German finance ministers in today's meetings underscored the economic importance of the talks.

Gorbachev stressed the role of trade in shaping relations between the Soviet Union and the Germanys. The Soviet leader pointed out that his country's main trading partners have been West Germany in the West and East Germany in the East.

"Problems are numerous," Gorbachev added, "but on the other hand the existing ties are evidence of our potentialities. Both sides wish to give a new dimension to their relations in the settlement of the Germanys' unification problem."

Gorbachev appeared to bristle at the idea that Western countries should attach strings to their aid, however. He referred to an International Monetary Fund correspondence to former Hungarian leader Janos Kadar, which he said, "gave instructions on what he should do first, second and third. If we are treated in this way, it is unacceptable. Besides, we are not looking for handouts . . . we are moving from one economic model to another, which will turn the Soviet Union toward the rest of the world."

Gorbachev's victory over Soviet hard-liners at the 28th party congress, which ended here Friday, may also help ease negotiations over the Germanys' future, West German diplomats said. Several conservative Soviet delegates recommended taking a hard line on the German question during the 12-day congress, but in the end Gorbachev submerged their viewpoint and squeezed them out of the leadership.

In today's meeting, the chemistry between Kohl and Gorbachev seemed auspicious. "The discussion is constructive and the atmosphere is good," Gorbachev said. "The personal relationship between myself and Mr. Kohl makes the situation easier." Kohl concurred, smiling. "We are looking forward," he said, "being aware of the history-making moment, but not forgetting the past."

In the afternoon the two leaders flew to Gorbachev's hometown of Stavropol, in the southern part of the Russian republic in keeping with an earlier agreement to visit one another's birthplaces. The trip included a stop at the office Gorbachev occupied as local party leader before coming to Moscow and by a stroll through Stavropol's square.

The two leaders have scheduled a joint press conference Monday in the Soviet city of Mineralnovevoda, or Mineral Water, after which Kohl will return to Bonn.