As weeklong activities marking the millennium of Christianity in Russia neared culmination, President Andrei A. Gromyko pledged to allow religious freedom for Roman Catholics in this officially atheist country.

Gromyko's statement, published Sunday in the Communist Party newspaper Pravda, came in response to a question from Cardinal Johannes Willebrands, a member of the largest Vatican delegation ever to visit the Soviet Union.At the St. Danilov Monastery, meanwhile, thousands of people celebrated a divine liturgy on one of the holiest dates on the Russian Orthodox calendar, known as "Sunday of All the Saints who Shone Forth in the Land of Russia."

The ceremony culminated a week of conferences, services and receptions commemorating 1,000 years of Christianity in Russia.

Willebrands, who heads the Vatican's secretariat for Christian Unity, was among several foreign dignitaries in Moscow for the millennium who attended a Saturday meeting with Gromyko.

"Of course we aren't making any attempts to encroach on the rights of the Catholic church," Pravda quoted Gromyko as telling the cardinal. "And likewise we are not trying to encroach on the rights of Catholics living in the Soviet Union."

The Vatican representative had asked whether it would be possible to organize Catholic churches not only in the Soviet Union's Baltic republics, where a recognized church exists in Lithuania, but also in other parts of the Soviet Union where there are large Catholic communities.

He listed those areas as the Ukraine, Byelorussia and Kazakhstan, according to Vatican spokesman Joaquin Navarro.

Those republics have no fully recognized Catholic churches, and the Vatican wants the right to appoint bishops there, Navarro said.

Pravda's report of the question, taken from a Tass dispatch, omitted the specific references to the Ukraine, Byelorussia and Kazakhstan, reflecting the Kremlin's sensitivity on the issue.

Gromyko said Catholic churches could be opened outside the Baltic states if local authorities agree.

"In the future, we will give the necessary attention to the wishes of Soviet Catholics, regardless of where they live," the 78-year-old president told the prelates.

Though officially atheist, the government supports the Russian Orthodox Church and has exhibited greater religious tolerance in the three years Mikhail S. Gorbachev has been in power.

Willebrands met Friday with clergy of the underground Ukrainian Catholic Church, which Josef Stalin ordered absorbed into the Russian Orthodox church in 1946 during a massive campaign of religious repression.