Roman Catholic Cardinal John Krol of Philadelphia said here yesterday that Pope John Paul II "accomplished his purpose" in lifting the spirits of the Polish people during his eight-day visit to his homeland.

Krol, in Washington to take part in dedication ceremonies for a new Czech chapel at the Shrine of the Immaculate Conception, predicted the pontiff's visit would have a long-range effect on the Polish people. The pope's visit was "not a major change," he said, "not an instant fix, but he set the tone."

The Polish-American cardinal, who accompanied the pope during the recent trip, said "the Polish people need a reaffirmation of faith and conviction that good will overcome evil. In that sense, he accomplished his purpose."

The crowds in the Polish cities, Krol said, were such that in many places, people had to leave their cars outside of cities and walk "10 or 15 kilometers" to the meeting sites.

There was a massive police presence throughout Poland, and tensions were high, Krol said. "I don't know who was more afraid, the government or the people."

Krol said there was a marked difference in the mood between the crowds this time and during the pope's previous visit to Poland.

"In 1979 the people were joyous, happy," said Krol, who accompanied the pope that year as well. He described the mood of the people in the recent visit as "gray skies, somber, subdued."

The Czech chapel at the shrine honors a predecessor of Krol's in Philadelphia, St. John Neuman, who emigrated from his native Bohemia to New York in the early 19th century and served as a missionary priest to German emigrants.

In 1840, he was named bishop of Philadelphia, and he is honored as the founder of the parochial school system in America. Six years ago Pope Paul VI canonized the saint, making him the first American man to achieve that honor.

Krol brought with him a relic of the saint which was ceremoniously installed in the chapel during yesterday's liturgy.

During the rite, priests--one with a camera slung over his white surplice--and many members of the congregation lined up to kiss the relic while the congregation sang Czech hymns.

Hundreds of Czech-Americans crowded into the chapel for yesterday's liturgy, coming from Czech communities as far away as Chicago and Texas. It is one of 57 chapels in the massive church, 10 of them ethnic in nature.

A life-size statue of the saint stands in the Czech chapel, and a stained-glass entry piece portrays scenes in his missionary career. It is properly known as the Chapel of Our Lady of Hostyn, after a shrine in Czechoslovakia.

"We wanted to name it after St. John Neuman," said the Rev. Roger C. Roensch of the Shrine staff, "but we were told all the chapels have to be named after women" because of the shrine's dedication to the Virgin Mary.

Today, Washington Archbishop James A. Hickey will participate in a dedication of the new chapel's altar, and a noon mass tomorrow at the shrine will also honor the new chapel and Czech Catholics.

The Czech community, which has been conducting a series of conferences and seminars in connection with the dedication of the new chapel, will celebrate with a festival on the shrine grounds from 2 p.m. to 6 p.m. tomorrow.