A Soviet military train, with 18 tanks strapped down on flatcars and some 150 soldiers traveling mostly in old boxcars, left here today heading back to Russia as the Kremlin began a limited troop withdrawal it has terned a gesture of "good will" in the cause of peace and East-West arms control.

The Kremlin plan also is intended to influence public opinion among the West European allies of the United States who now face critical decisions on modernizing their own military forces. The Soviets took the rash step of inviting scores of Western reporters and television crews the official departure festivities here.

The troops that left today to the music of Soviet and East German bands and the traditionally effusive East Germany expressions of official devotion, are part of the 6th Soviet Tank Division based in the region around this gray, industrial town where, 462 years ago, Martin Luther nailed a document to the door of a Catholic church and began the Protestant reformation.

The Soviets, according to Western estimates, have some 400,000 frontline troops and 7,000 tanks in East Germany. Under the withdrawal plan announced in October by Soviet President Leonid Brezhev, up to 20,000 of these troops and 1,000 tanks will be pulled back Soviet borders within one year.

Brezhnev's surprising unilateral pledge was undoubtedly meant to help improve the climate for passage of the U.S Soviet strategic arms treaty now before the Senate and perhaps to help break the deadlock at the East-West troop reduction talks in Vienna.

Most importantly, however, Western officials believe it was meant to try to forestall a NATO decision which would allow stationing in Western Europe of new U.S. medium-range missiles able to reach the Soviet Union and designed to counter new Soviet arms already in place.

The start of the troop withdrawal here comes just one week before NATO is expected officially to approve that decision and on the same day that the ruling Social Democratic Party of West Germany met just 75 miles from here in West Berlin to give its approval.

Though that West German approved did come late today, the Soviet troop move and other gestures, both conciliatory and threatening, are undoubtedly part of a long-term Kremlin campaign to keep the pressure on Bonn. West Germany is perhaps the most vital member of the NATO alliance in conventional military terms.

In the Communist half of the divided city of Berlin today, foreign minister of the Soviet-led Warsaw Pact countries also covened a meeting headed by Soviet Foreign Minister Andrei Gromyko. The Bonn Government tonight was anxiously awaiting statements from that meeting which could signal how serious the pressures will be.

In this East German city, the Soviet officer in charge of the departing troops gave the most restrained speech, in the contrast to those of East German military officers and local Communist Party officials.

The tanks on the train were Soviet T62s, a modern tank but one that was replaced in recent years by the new T72 as the main battle tank in the Soviet arsenal. A dozen more tanks and a handful of armored personnel carrier and mobile antiaircraft weapons could be seen on another rail siding, but neither the Soviets nor East Germans would say how many troops were leaving or when.

The East German officials spoke of warm personal relationships developing here but others on the street said that contact between the Soviet troops and the population was almost nonexistent because of the language problem.

Some German youths, asked if they learned Russian in school, said they did but only laughed when asked if they spoke Russian. Others said it was nice that the Russians were able to go home and then giggled. Some others, however, chided Westerners for spending too much on weapons and not enough on schools and hospitals.

Only twice before have the Soviet allowed Western reporters anywhere near their troops in East Germany and both occasions involved troop reductions, the last one coming in 1958.

About 30,000 Soviets troops were withdrawn in 1956 and another 41,000 in 1958. These were viewed in the West as connected mostly with a reduction in size of the wartime Soviet Army, which reduced its forces more slowly than did the West after the World War II buildup.