The Kremlin leadership today announced the death of Soviet President Konstantin Chernenko and within hours named its youngest member, Mikhail Gorbachev, to succeed him.

Chernenko, 73, died last night of heart failure following deterioration of his lungs and liver, according to an official medical report. He held power for 390 days but was seriously ill during the past two months.

In an unusually smooth and quick power transfer, the 54-year-old Gorbachev was elected general secretary of the Soviet Communist Party, the country's most powerful political job, at an extraordinary session of the policy-making Central Committee this afternoon.

The accession of Gorbachev to the post appears to end a painful and protracted transition period in which the Kremlin was plagued by the infirmities of its previous three leaders.

In his acceptance speech, read over Moscow television, Gorbachev pledged to continue the domestic and foreign policies of his two immediate predecessors, Chernenko and Yuri Andropov.

He expressed desire for a "serious improvement" in relations with China and vowed to continue Moscow's policy of peaceful coexistence.

In a pointed and explicit reference to the opening Tuesday of Soviet-American arms talks in Geneva, the new Soviet leader said he wants "a real and major reduction of the arms stockpiles." Moscow, he said, also wants to prevent the development of new weapons systems.

"We would like our partners in the Geneva negotiations to understand the Soviet Union's position and respond in kind," he said. "Then agreement will be possible." Gorbachev's speech to the Central Committee was broadcast less than five hours after Chernenko's death was announced.

It was Chernenko who sought to make his mark in foreign policy and who reversed his predecessor's confrontational policy toward the United States, seeking to resume arms control talks. Ironically, Chernenko died on the eve of the Geneva talks, but Gorbachev went out of his way to reassure the Reagan administration that Moscow's position at Geneva remains unchanged.

Following the announcement, a joint statement issued by the Central Committee, the Supreme Soviet (parliament) and the Soviet government called on the people to "unite their ranks" around the leadership. It hailed Chernenko as an "outstanding leader and a staunch fighter for the ideals of communism, for peace."

Gorbachev was not named to the two other major posts that his predecessors as party general secretary have held: president of the Soviet Union and chairman of the Defense Council. He may yet acquire those titles, but the party chief position is by far the most important.

A medical bulletin signed by Dr. Evgeny Chazov and eight other physicians said Chernenko suffered "for a long time from pulmonary emphysema." It said his condition was complicated by deterioration of lungs and liver and cardiac insufficiency and that he died at 7:20 p.m. yesterday.

Tonight, black-bordered red flags appeared on the streets of Moscow, as the government declared a three-day period of national mourning. A state funeral is scheduled for Wednesday in Red Square and is expected to be attended by a number of world leaders.

Soviet citizens will be able to pay their respects for 12 hours on Tuesday and Wednesday, the official news agency Tass said.

Earlier today, police sealed off the center of the city in preparation for the funeral. Chernenko's body is lying in state at the Hall of Columns, not far from Red Square.

After the plenum this afternoon, Gorbachev led senior Soviet officials, including Premier Nikolai Tikhonov and Politburo members Andrei Gromyko, Viktor Grishin and Grigori Romanov, to the Hall of Columns to pay respects to the dead leader and to express condolences to the members of his family.

Chernenko's death had been expected, and reaction of Muscovites was muted. But the election of Gorbachev later in the day was welcomed warmly as Moscow residents cheered and congratulated each other.

The death of three elderly leaders in little more than two years and their protracted physical ailments have produced an atmosphere of frustration and unease here.

Gorbachev's relative youth seems to be the main source of his popularity, as he is expected to remain in power for a decade or more. Apart from providing for stability, he also is expected to open the way to new ideas and changes in the system.

Leonid Brezhnev, who died in November 1982, was gravely ill during most of that year. His inability to assert himself in physical terms seemed to symbolize the inability of the Kremlin leadership at the time to cope decisively with a series of domestic and foreign problems.

Andropov, who succeeded Brezhnev, raised expectations and pursued a program of change only to fall seriously ill four months into his brief rule. He was not seen in public for the last 174 days of his 15-month tenure.

Chernenko, who succeeded Andropov in February 1984, vanished from public view last July when he was hospitalized with a heart ailment. He bounced back in September and kept a busy public schedule until he became seriously ill in early January.

He last was seen in reasonably good health on Dec. 27 at a Kremlin reception. But he was unable to attend a Kremlin preelection rally on Feb. 22, and the Soviet people were told then for the first time that he was in poor health. Chernenko made a valiant effort to show himself voting on Feb. 24, but he appeared on official photographs and on television to be in poor condition and to have obvious difficulty moving his left arm.

However, Chernenko's ailments did not create much apprehension here compared to the similar situations surrounding Brezhnev and Andropov. Because of his age -- at 72 he became the oldest man to be elected Soviet leader -- he all along had been viewed as a temporary figure in a transitional period.

The announcement of his death and the speed with which the leadership dealt with the succession question suggest that both had been anticipated.

Rumors circulated here this past holiday weekend that Chernenko had died. However, life in Moscow seemed normal until early this morning, when Moscow radio changed its programming and began to broadcast sad, classical music.

The change coincided with reports that two Politburo members traveling abroad suddenly had cut short their visits to return to Moscow.

Vladimir Shcherbitsky, who was leading a parliamentary delegation on an official visit to the United States, informed the State Department yesterday that he and his group wanted to fly to Moscow as soon as possible, cutting short the visit by three days.

Vitali Vorotnikov, who was visiting Yugoslavia, suddenly departed for Moscow last night after an official dinner. He was to have met with the Yugoslav president in Belgrade today.

Despite these unexplained departures, officials in Moscow sought to proceed with business as usual. The new French Foreign Minister, Roland Dumas, who arrived here on an official visit yesterday, met separately today with Gromyko and Tikhonov.

The thrust of Moscow's attitude, which also was reflected in Gorbachev's speech, was to avoid any impression of a power vacuum or policy vacillation.

It was Gromyko, the most experienced member of the Politburo, who advanced Gorbachev's candidacy for the post of general secretary at the plenum this afternoon. This in itself was seen as symbolizing the backing of the "old guard" Politburo members for Gorbachev.

The emphasis on continuity was reflected in Gorbachev's first speech as general secretary in which he spelled out his adherence to consensus politics of the Kremlin, although he appeared to stress populist ideas, calling for higher standards of living.

Diplomatic observers here see Gorbachev as representing a younger generation in the party and the country, a generation alarmed by the continuing poor performance of the Soviet economy and urging fundamental changes in the system.

Initially, however, he is not expected to make any far reaching proposals or decisions, as it may take several years for the new leader to build up and strengthen his power base.

The fact that Gromyko was the one to advance Gorbachev's candidacy suggested to observers here that the influence of the veteran foreign minister remains great. There is speculation that Gromyko may be promoted to the post of premier once Tikhonov, who will be 80 later this year, retires from office.

A Tass announcement about the composition of the funeral commission gave an early clue that Gorbachev would be Chernenko's successor. Tass said the funeral party would be headed by Gorbachev, and in the past this function has presaged selection as successor to a deceased leader.

Besides Gorbachev, others named to the commission were the seven remaining Moscow-based Politburo members and four deputy members. Not included were Politburo members Dinmukhamed Kunaev and Shcherbitsky, who are not based in Moscow, Tass said.

In his speech, Gorbachev praised the "long and glorious" road of his predecessor and praised Chernenko for his talent and ability to work with people. He said that "the strategic line" of the party as developed by Chernenko and Andropov "remains unchanged." The emphasis of his leadership will be on development of the Soviet Union's socioeconomic potential, Gorbachev said. He mentioned several ideas advanced by Andropov, such as reforms of the economic system, greater independence for enterprises and improvement of living conditions.

Gorbachev is now in the pivotal position to consolidate his position before the 27th Communist Party Congress, to be held later this year. Both at home and abroad, he is likely to project a new image of a vigorous Soviet leader. Ultimately, however, he will have to depend on the backing of the existing party hierarchy.

Gorbachev ended his speech by appealing to all Politburo members and members of the Central Committee for support. He said he was aware that his election means that he faces "complex and great duties."

"I promise you, comrades, to do my utmost to faithfully serve our party, our people," the new leader said.