World War II tanks and modern missiles rolled through Red Square today as the Soviet Union celebrated the 40th anniversary of the victory over fascism with a parade that showed off its military glory, past and present.

Soviet leader Mikhail Gorbachev presided over an hour-long ceremony, the culmination of a Victory Day anniversary that has consumed this country's attention for months.

It was only the second time that the Soviets organized a military parade to mark the Victory Day anniversary: Both the 10th and the 30th were observed by simpler, civilian demonstrations headed by veterans.

Today's parade began with standard-bearers marching past the Lenin Mausoleum holding the banners of the Soviet Union's war fronts: Byelorussia, Ukraine and others. The victory banner, the flag hoisted over the captured Reichstag in Berlin on April 30, 1945, was also in today's parade.

Close behind came rows of veterans, their chests covered with medals, marching ramrod straight past the Lenin Mausoleum. The realization that for many of the veterans, this may be the last big Red Square parade added rare emotion to today's ceremony, which was held in a cool breeze and under gray skies. Also marching today were Polish and Czechoslovak veterans who fought with Soviet troops.

There was also a contingent of Soviet partisans and "home-front workers," many of them elderly, the men in berets and the women in kerchiefs. These and the other veterans were the stars of the show, drawing applause from the crowd.

The first display of military equipment was an almost nostalgic review of World War II weapons, including the Soviets' famous T34 tank, considered one of the war's best fighting machines. In the tanks and trucks were young soldiers, dressed in World War II-style helmets and capes.

After a pause, the modern weapons rolled through the square, including several that have not been displayed here before. Among the newly shown pieces were the SS21 tactical nuclear-capable missile, a modern replacement for the Frog missile; the T64 tank and a new piece of artillery called the M1976.

It was the first time in several years that the Soviets added anything to the lineup of hardware in a military parade. But the new additions, although never seen before in Red Square, were considered more symbolic than militarily noteworthy by western observers.

Neither the U.S. ambassador nor the military attache attended today's parade because of a continuing protest over the Soviets' handling of the shooting death of Maj. Arthur D. Nicholson Jr. by a Soviet sentry. Two counselors from the U.S. Embassy attended instead.

Both the French and British ambassadors attended, but the Dutch ambassador, among others, did not, continuing a four-year old protest by NATO countries of the Soviet invasion of Afghanistan. The West German ambassador was invited but did not attend.

U.S. Ambassador Arthur Hartman, who laid a wreath at the Tomb of the Unknown Soldier here yesterday, did attend a reception this afternoon in the Kremlin where, he said, he and Gorbachev briefly discussed hopes for serious discussions at next week's meeting in Vienna between Secretary of State George P. Shultz and Soviet Foreign Minister Andrei Gromyko.

In a speech before the parade, Defense Minister Sergei Sokolov said the Soviet Union has made it clear that "retribution will be inevitable" for any encroachment onto Soviet soil or that of its allies.

Sokolov criticized "capitalistic propaganda" for its "strenuous efforts to falsify history . . . and to belittle the role of the U.S.S.R. in the rout of the fascist invaders." The Soviet press has been harshly critical of President Reagan's V-E Day speech in Strasbourg in which he made no mention of the Soviet Union's participation in the war.

At the reception toasting the victory, Gorbachev noted that the world's problems "can and must be resolved only by . . . patient and constructive dialogue."