COMMUNISM vs. Catholicism. Kremlin and Vatican. Two great ideologies, fundamentally at odds, competing for the mind and spirit of countless millions. "How many divisions has the pope?" Stalin once asked with a sneer.

Well, in Poland, at least, the Soviet leaders are about to find out.

Pope John Paul II, the former Cardinal Karol Wojtyla of Krakow, returns to his native land this week, for what should be an extraordinary stay. Deep beyond the frontier so long known as the Iron Curtain, this modern apostle of Christianity will be greeted - from all indications - by crowds as far larger and more adoring than Poland has ever seen before.

For more than three decades, atheism has been officially preached in Poland. Yet the Polish church today is the leading opposition group in any country of the Soviet bloc. Nowhere else is there an organization or institution outside the control of the state that wields as much legitimate, overt influence as this church.

Even Communist authorities acknowledge that 70 percent of the country's 35 million people are practicing Catholics. The church's own figures run to as high as 95 percent and they may well be accurate. There are now 19,000 priests in Poland, more than ever before. The church, through affiliated groups, puts out newspapers, magazines and books. It proselytizes the population on every major issue of the day, often sharply challenging the party view.

The main underpinning of Soviet-style control is tight central management of state activities, economic, social and intellectual. Control of public expression, the media and the mind, is essential to Kremlin communism. Because of the church in Poland, control of the people is a good deal harder. Poles, in effect, vote with their allegiance to the Vatican.

That phenomenon has reached the ultimate with a Pole's ascendancy to the papacy - and now his voyage home.

So right there in Moscow's orbit, in the biggest Marxist-Leninist country in Eastern Europe aside from the U.S.S.R. itself, a display of fervor is expected - in part religious, in part nationalistic, but wholly antithetical to all things communist.

Add this event to the momentous defiance faced by the Kremlin in its years of empire - Hungary, 1956, Czechoslovakia, 1968, now Poland, June, 1979. But this time, unless a tragedy occurs, some unforeseen clumsy or brutal effort to stifle the public display, the outcome will be very different: a peaceful triumph of popular will over Soviet might.

Overstatement?

After all, Pope John Paul's visit will only be eight days long and largely ceremonial in content. But with the role of the church what it is, it would be a mistake to consider the events mere pageantry of passing impact. When a nation nominally subject to one authoritarian ideology shows open faith in a different set of beliefs, such an occasion is profoundly political.

At home, a relative handful of its own dissidents are a cause of major irritation to the Kremlin, even though the dissenting few can easily be crushed, sent to jail or exile. Imagine then the scale of Soviet consternation when virtually an entire people, supposedly in Moscow's camp, follow an alien credo.

But what can the Soviets do? Tanks probably wouldn't work and the consequences, as the Politburo certainly recognizes, would be cataclysmic. Poles are highly volatile. In 1956 and 1970, they brought down leaders whose policies had become particularly rigid. As recently as 1976, widespread riots over food price increases forced the present government of Edward Gierek to rescind them in 24 hours.

In all these instances, the church stepped in to counsel public moderation while also backing the pressure for reforms. The state needs the church in Poland to help keep the Russians out. On that score there is no disagreement.

Stalin-style repression was tried. In the early 1950s, thousands of priests and lay followers were thrown into jail. The approach didn't work and was replaced by a complex system of formal obstacles and petty harrassment: limits on church construction, for instance, and censorship. The mass is not televised despite considerable demand, and one of John Pope's first statements as pope was excised because it offended some nervous apparatchik. Religious education in the schools is not permitted and some seminary students have problems with the army.

Still, the church thrives in this adversity as nowhere else in the world. On Sunday morning, crowds crush into the churches, large and small. In 1977, when then Cardinal Wojtyla opened a massive cathedral in Nowa Huta, the first city built by the Communists after World War II as a model of the new order, 50,000 people turned out and many wept. It had taken 25 years to win approval for construction.

"Did it have to be done this way?" Wojtyla asked. "Couldn't it and can't it still go a different way for the building of churches that are so necessary for the Catholic population of Poland?"

Publications popular

Even in their censored format, the best church publications are extremely popular.

The weekly newspaper Tygodnik Powszechny, put out by Znak, one of the Catholic lay groups, comes out in 40,000 copies (compared to the 300,000 permitted the leading party political weekly, which obviously gets the major share of restricted paper supplies). But is passed from hand to so many hands that it may well be one of the best read publications in the country. Old copies sell for as much as the equivalent of $25.

In short, regardless of what the Soviets might wish, the church in Poland and the independence of mind that it represents cannot be suppressed. It is simply too strong, too deeply rooted, closely identified in the heart of every Pole with the very nation itself.

That all this could be so is testimony to Poland's remarkable resilence. Often occupied in its history, its territory divided and dominated by outsiders, Poland has never truly been vanquished. In the 18th century when Poland was carved up among the Prussia, Austria and Russia, only the church remained as protector of the national identity. Church became synonomous with state.

So long as creed survives, along with language and popular traditions, a nationality exists. And in Poland, creed has done more than survive. It has flourished.

Moreover, Poland today, with boundaries set at the end of World War II, is a more homogeneous place than it was in the past. Jews were eliminated in the war or emigrated abroad (the remnants of what was once the most important Jewish community in Eastern Europe are pathetic). The Russian Orthodox are back in Russia and German Protestants have been repatriated.

Before the war, 65 percent of Poland's population consisted of ethnic Poles. Now, 98 percent of the people are of Polish ethnic origin - more Pole and, therefore, more Catholic.

Even if the church confined itself purely to religious matters, it would be a formidable force. But isolation from politics is impossible in Poland and the church inevitably is drawn into direct dispute with the party.

Take the case of the censor's objections to John Paul's Christmas statement, a letter to be read from pulpits. Censors heavily trimmed the message, deleting praise of St. Stanislaw, martyred by Polish King Boleslaw the Bold in an 11th century church-state dispute.

Why?Because, according to church sources, censors said the pope's remarks implied criticism of the modern Polish state. What the pope said in part was:

"We can see in St. Stanislaw a spokesman for the most essential human rights and the rights of the nation - those which decide about its dignity, morality and real freedom."

With that sort of provocation and under the shrewd, cautious guidance of Cardinal Stefan Wyszynski, the 77-year-old patriarch of Poland's Catholics, the church has increasingly moved to support Poland's lay human rights movement, such active dissident groups as KOR, a committee in defense of workers' rights and "flying universities" where professors teach courses, sometimes in church, on subjects that regular universities wouldn't touch. The Catholic University of Lublin, the only non-state university in communist Europe, bustles with student discussion of controversial issues.

Catholic clubs for intellectuals provide officially sanctioned forums for debate behind closed doors on such touchy subjects as literary censorship and restrictions on travel abroad.

The impact abroad

On the international scene, Poland's government solemnly adheres to the Soviet line in every respect, barely budging an inch from the Kremlin's policy. And Poles, by and large, seem to understand the necessity of such orthodoxy abroad as the price for relative flexibility at home.

The intensity a visitor feels in Poland rarely turns on the basic fact of the country's alliance with Moscow. That looming Soviet presence to the east is accepted as a reality of geopolitics. The need to feel separate and apart so important to Poles is preserved and cherished largely through conviction in the church.

Until now all this has been essentially a domestic matter. And the Soviets, finding themselves unable to muffle the Poles, have come to accept them.

But the visit of Pope Paul II is a major international event. The impact on other Communist-run countries is bound to be considerable. There are large Catholic communities in Hungary (65 percent), Czechoslovakia (54 percent) and elsewhere. Seeing the leeway of their Polish brethren has to excite some aspirations among the faithful in similar lands.

A broader question is whether Soviet sway throughout the region is challenged by this force of Catholicism; whether the emergence of any such powerful alternative to Marxism-Leninism poses a long-term threat to Moscow's hegemony. The answer lies ahead. Other Soviet bloc countries do not have Poland's particular features. yet freedom is a virus, even in so special a form. The bonds of the Soviet bloc may weaken. The world may be watching Poland in the days ahead - especially the Kremlin. CAPTION: Picture, Pope John Paul II.