Vice President Mondale flew into Berlin under leaden skies this moring to renew, on behalf of the Carter administration, the pledge made by six previous postwar presidents to defend the freedom of this city.

He got his first look at the Berlin Wall that separates West Berlin from Communist East Berlin, and called it "A symbol of failure" for communism and also "A symbol of how much progress yet remains" to be made in ending the Cold War tensions.

From Berlin, the touring Vice PResident flew on to Rome, where he was extremely cautious in defining the new administration's attitude toward another aspect of the Communist challenge - the possible participation of freely elected Communists in the Italian government.

He and his aides would not even acknowledge that the question was discussed with Italian Premier Giulio Andreotti. The prime minister's premier's minority Christian Democratic government remains in office by tacit consent of the Communists, who finished second in the l ast Italian elections.

There was no equivocation in Mondale's words at the Berlin City Hall, where he was welcomed by the most enthusiastic crowd of his European trip. He paused, as if in thought, before the plaque marking John F. Kennedy's "Ich bin ein Berliner" speech of June 1963, and then told some 400 government and civic leaders:

"We will leave no doubt that the United States stands by its commitment to use whatever means may be necessary to resist any attempt to undermine the freedoms of the city."

As a symbol of that commitment, American British and French troops mustered at Tegel airport when Air Force Tow brought Mondale from Bonn for his three-hour visit to the city that has been the focus of Soviet-Western struggle for 30 years.

Under heavy security protection, Mondale was driven to the Brandenburg Gate, where the climbed the platform to view the wall the Communists erected in 1961 to cut off free emigration from East Berlin to the western part of the city.

Mondale later told reporters: "It was the first time I'd been there. It's hard to imagine a symbol that's more dramatic than that of the failure of a system . . . there've been a lot of wals built in the history of mankind, but very few have been built solely for the purpose of keeping people in."

In his speech at City Hall, Mondale said that "confrontation over Berlin must be put firmly and forever in the past." But he said that could be done only if the Soviets "strictly observe" the Four-Power agreement on rights in Berlin negotiated in 1971 during the height of the Nixon administration's detente policy with the Soviet Union.

Earlier this month, East Germany and the Soviet Union took a series of steps to impede movement into and out of East Berlin - steps the Western allies have vigorously protested. They began requiring foreigners to obtain a visa to enter East Berlin, and stationed troops in front of the West German mission in East Berlin to take the names of people applying for emigration permits. Upward of 100,000 East Germans had sought to leave in the past year.

It was for this reason, as much as any uncertainty about the Carter administration policies, that Berlin Mayor Klaus Schuetz said he was "particularly pleased" that Mondale had come to Berlin in the first week of the new administration to reaffirm "the consistent continuation of the American policy on and for Berlin."

Taken together with Mondale's pledge to the NATO Council in Brussels on Monday that the United States would increase its contribution to the defense of Western Europe, the Berlin visit and statement were viewed by some observers as evidence of a stiffened attitude toward the Soviet Union. But State Department officials traveling with Mondale said there was no hardening of the U.S. position.

The focus of Mondale's two-hour talks with Andreotti and other Italian leaders was on what he called the "serious difficulites" facing the Italian economy. Italy has been experiencing a 20 per cent inflation rate and economists for the European Community have projected a recession for this year.

Nonetheless, Mondale said he was "greatly encouraged" by the picture given him today and expressed the hope that Italy's application for a $520 million loan from the International Monetary Fund will be brought to "a satisfactory conclusion on terms acceptable to all concerned."

State Department aides, however, said Mondale did not offer any American intervention with the IMF on Italty's behalf, saying "it's not our business."

Nor, they said, was there any discussion of bilateral American aid to Italy.

They said there was no direct discussion of the Carter administration's attitude toward possible Communist participation in the Italian government - an issue in last fall's Carter-Ford campaign. The Ford administration had said that such participation would require a "reassessment" of Italy's role in the NATO alliance.

Carter, on the other hand, said the United States must "respect the results of democratic elections . . . and continue to cooperate, so long as such political parties respect the democratic process, uphold existing international commitments and are not subservient to external direction."

Before coming here, Mondale aides said the question of Communist participation in the Italian government "may by discussed." Today they said it arose only indirectly, when Italian officials in their economic briefing mentioned Communist control of some labor unions as a part of their problem in combating wage inflation.

One official in the party said the Carter administration would have to take "a close look" at the situation if it arose "but not necessarily change policy."

Mondale's Rome visit concludes Thursday with a call on Pope Paul and then he flies on to London.