The world's first Polish pope returns to his homeland Saturday, where more than a million people are expected to line the streets of Warsaw in a vivid demonstration of the strength of Roman Catholicism in a Communist country.

The return of Pope John Paul II is one of the most momentous events of Poland's thousand-year history.

At railway stations tonight, trains were arriving every few minutes carrying pilgrims for Saturday's opening events. In huge Victoria Square, where former Krakow Archbishop Karol Wojtyla will make his first major address, crowds already were gathering around a towering cross specially erected on an altar above the cobblestones.

It is the crowds, the sheer crush of people, unprecedented for this country, that represents an exciting but potentially troublesome aspect of the trip.

With final preparations under way for the pope's nine-day trip through Poland, the sense of expectation tonight is palpable among many of Poland's 35 million people, of whom 90 percent are Roman Catholic. Church groups are hanging banners from their turrets.Even the government will be flying the papal flag on Saturday next to Poland's own red-and-white insignia.

Aside from the logistical problems, Communist Party officials are apprehensive about the visit. But the party has not restricted attendance by its members at papal events, and party leader Edward Geirek will receive the pope Saturday.

Even Security plainclothes officers interspersed among the crowds have been given permission to kneel during the visit if the spirit moves them, thus making them less obvious in the crowds.

Still, some police pressure is evident. Dissident political groups insist they have no plans to make trouble. Nevertheless, police took four activists into custody Thursday from 48 hours. Among them was Adam Michnik, a leader of the Polish human rights movement. Another leading activist, Jacek Kuron, complained that police were following him with unusual intensity.

Both Communist Party and senior church officials canvassed today generally were confident that the situation will not get out of hand.

"The church knows very well that unexpected events can make things worse, so there will be no attempt," a senior Communist official said. "Everybody knows the whole world is watching us, including our friends," a reference to the Soviet Union, which is uneasy about the trip.

The visit, however, is of such potential emotional magnitude for most Poles that it may well take on a momentum of its own, thus retaining an element of unpredictability.

For the Communist government, the papal visit presents a serious dilemma. Most Poles, even non-Catholics, share a certain pride in the new pope as a symbol of the Polish nation and its traditional outspokenness. Yet he also symbolizes and enhances the status of the already powerful Catholic Church here as an alternative to the officially atheistic Communist government that has ruled since the end of World War II.

From the outset, the trip has represented a compromise between a reluctant government and a church anxious to take advantage of the pope's position to obtain improvements here. One result is that no one will be completely satisfied.

For example, it was announced here today that live television coverage would be limited. The pope's arrival in Warsaw and the major events in this city will be carried live over the nationwide network. However, the pope's visit to Gniezno in western Poland, where crowds of several million are possible, and to holy shrines in Czestochowa and his former archdiocese in Krakow in southern Poland, will, with few exceptions, be televised only locally. This has disappointed many Poles and a monsignor told reporters tonight, "Our wishes were greater."

At issue in a broader sense is church access to the mass media, which the government has sought to prevent.

Limited use of the nationwide broadcasts is significant for another reason. They can be received in areas across the Soviet border where there are concentrations of Catholics.

Unconfirmed reports here indicate that large numbers of Catholics in Soviet Lithuania, the Ukraine and Byelorussia have moved close to the border in hopes of picking up the Polish television.

Other reports suggest that, with few exceptions, the Soviet border with Poland is closed to pilgrims during the papal visit. Groups of Hungarians and some Czechs, Slovaks and East German visitors, however, are said to be here.

Negotiations on arrangements for the visit between church and state have generally been described as frustrating by church sources for the past several weeks. But today, a ranking cleryman said the situation had improved considerably in recent days with the government promising about 2,000 buses, four times the number previously promised, in addition to special trains to bring people in from outlying regions.

The question now, the official said, was whether it was too late to put these promises to work, although an army officer said tonight that there were already about 600,000 people expected to arrive in Warsaw overnight in addition to the city's 1.2 million population.

Faced with the prospect of moving huge crowds in a spring heat wave, authorities have also made extra hospital beds available and are keeping staffs in all government buildings.

After the pope arrives here he will ride seven miles through town on a throne on the back of a flatbed truck to the cathedral. He will meet government leaders and then celebrate an open-air mass at Victory Square. More than a million Catholics are expected to pack the square for a rare pontifical mass.

On Sunday he will visit Gniezno. He moves on Monday to make a pilgrimage to the shrine of the "black Madonna" in Czestochowa.

The pope will travel to his home town of Wadowice on Thursday, and he plans to visit the site of the Auschwitz concentration camp and to say mass at the railyards of what was Birkenau death camp nearby.

On June 10, he will hold a rally in Krakow in honor of St. Stanislaw, Poland's patron saint.