The head of the Soviet Union's state planning organization, Nikolai Baibakov, has been retired after 20 years of directing the massive agency, known as Gosplan, the official news agency Tass said.

In the continuing shake-up of senior Soviet officials, Baibakov was replaced by Nikolai Talyzin, 56, a deputy chairman of the Soviet Council of Ministers with broad international experience, Tass said. At the same time, Talyzin was elevated to one of only four first deputy premierships, indicating an upgrading of the top Gosplan position.

Talyzin, an engineering and communications specialist, has been chief Soviet representative to Comecon, the trading organization of the Soviet Bloc countries, has headed the U.S.S.R.-Finland Society and served on the organizational committee of the 1980 Olympics, according to an official biography. He was in Afghanistan for the 1979 invasion, and has traveled extensively elsewhere abroad, according to western sources here.

The replacement of a senior Soviet official whose career in the Kremlin bureaucracy goes back decades and peaked under Leonid Brezhnev, with a largely unknown technocrat a generation younger, follows the pattern set in March when Konstantin Chernenko died at 74, and Mikhail Gorbachev, 54, assumed the Kremlin leadership.

Talyzin, charged with day-to-day implemention of the five-year economic plans, takes office in the thick of discussion about the direction of Soviet economic policy for the next 15 years. The 1986-90 plan must be submitted before the 27th party congress, scheduled for February.

As Gosplan director, Baibakov supervised controversial draft versions of the new plan, which Soviet officials say has been returned several times for revision. Soon after taking office, Gorbachev rejected the original draft, the officials say. Projected growth rates for the flagging Soviet economy and the areas in which capital investment should be concentrated are two contentious issues related to debate about the plan, according to western economic experts here.

Baibakov was also relieved of his duties as deputy premier and placed on pension, Tass said, three weeks after Nikolai Tikhonov, 80, was replaced as Soviet premier by Nikolai Ryzhkov, 56.