Tens of thousands of Roman Catholic faithful gathered in Saint Peter's Square yesterday to attend the funeral services for Pope John Paul I, who died last Thursday night after the briefest reign as pontiff in more than three centuries.

"He passed as a meteor which unexpectedly lights up the heavens and then disappears, leaving us amazed and astonished," said Cardinal Carlo Confalonieri, dean of the Sacred College of Cardinals, in his sermon to the crowd gathered under umbrellas against the intermittent rain that punctuated the two-hour openair ceremony.

The body of the pope, who died of a heart attack at the age of 65, lay in a simple coffin placed on an oriental rug on the church steps. An open book of gospels was open atop the coffin, and a white candle, signifying enternal life, stood alongside.

The funeral, televised to 31 countries, marked the beginning of nine days of official mourning. On the 10th day, Oct. 14, the 112 cardinals who are younger than 80 will be sequestered in the Sistine Chapel to begin the process of electing John Paul's successor.Thatsuccessor will become the 264th pope.

As twilight settled over the city and bells of St. Peter's tolled, 12 black-suited pallbearers took the coffin to the Basilica of Saint Peter's.

The crowd in St. Peter's Square broke into a long applause as the coffin was carried inside the church.

Walking down the central nave, followed only by the pontiff's immediate family and a half dozen cardinals, the pallbearers moved to the left of the main alter and slipped through the "door of death," sculpted hour glass in his left hand, down to the grottoes beneath the church.

Inside the grottoes, John Paul's cypress casket was placed in a lead liner weighing 880 pounds. This in turn was placed in a more massive oaken casket.

Both the lead and oak casket bore a bronze plaque with Latin inscriptions detailing the dates of John Paul's life and reign.

Embossed above the inscription was a cross with a skull and crossbones at its foot. Below that was John Paul's coat of arms-a shield with mountains, the winged lion of Venice's St. Mark's and the word "humilitas."

The coffin was then lowered into a marble sarcophagus and covered with a large stone slab. The tomb was only a few steps away from those of John XX111 and Paul VI, the two immediate preceding pontiffs from whom he took his name. Buried nearby are 144 other popes.

Most countries were represented by ambassadors accredited to the Holy See. There was a sprinkling of cabinet ministers but Italy was the only country to send its chiefs of state and government. The U.S. delegation was headed by Lillian Carter, the mother of President Carter. It also included Sen. Thomas Eagleton (D-Mo), Mayor Edward Koch of New York and Connecticut Gov. Ella Grasso.

For Pope Paul VI's funeral in August, most countries were represented at a higher level, President Carter sent his wife, Rosalynn, and Vice President Walter Mondale.

The funeral mass was concelebrated by 92 of the 127 members of the college of Cardinals. Earlier, an estimated 750,000 people had filed past the Pope's body as it lay in state of the Vatican.

Colorfully garbed parriariches of the Maronite, Armenian and other Eastern rites of the Catholic Church joined in the funeral ceremony, reciting portions of the liturgy in Greek and Arabic. The service, Officially characterized as "simple," was made as similar as possible to the one held for Paul VI, who had asked in his will that a normal funeral mass be held instead of the elaborate papal mass that was previously the rule.

Pope Pauls funeral took place only seven weeks ago, when 100,000 persons turned out on a sunny Saturday afternoon to pay him tribute. Pope Paul died Aug. 6 at the age of 80 after a 15-year reign. On Sept. 3 the little-known Albino Cardinal Luciani, patriarch of Venice, was installed as supreme pastor of the world's 700 million Roman Catholics. He took the title of John Paul I.

Two hundred priests went among the faithful to distribute the white communion wafers that represent the body of Christ. The demand was so great that some of the priests could be seen showing mourners that their ciboriums were empty after they had given out all the wafers they contained.

Along with the representatives of governments were the ecumenical representatives of a number of other faiths, including the main Protestant organization, the World Council of Churches, the Churcnes of England and Scotland and major international Jewish organizations.

Juvenal, the patriarch of Moscow, representated the Russian Orthodox church, recalling perphaps the most dramatic moment in John Paul's 33-day pontificate. It came on Sept. 5, when Juvenal's predecessor as head of the Russian church, Patriarch Nikodim of Leningrad, collapsed and died in Pope John Pauls arms in the middle of an audience at the vatican.

Also prominent among the lay mourners were the brother and sister of the late pope. In the audience, 750 place were reserved for natives of Belluno, the northern Italian district where John Paul was born and reared.

There seemed to be a large proportion of young people in their twenties in the crowd. There were also large numbers of nuns in religious habits, but the large square was not filled entirely.

Halfway through the ceremony, eight Vatican attendants came forward behind the large, simple outdoor alter with a portable canopy to cover Cardinal Confalonieri as the tall, straight-backed 85-year-old prelate led the services.

Behind each cardinal, an attendent opened a black umbrella. At final, wind turned the pages of the holy gospel placed on top of John Paul's coffin, but the rain soon soaked the pages.

Confalonieri, who also delievered the eulogy for Pope Paul, spoke of John Paul as "the perfect teacher" with his ability to translate complicated theology into everyday language.

"With wonderful jumility and that wisest paychological intuition," said the eulogist, "he spoke directly to children 'in order that they might help the pope," as he so graciously put it. Everybody understood that he was speaking to the little ones so that the adults would hear and understand."

The cardinal alluded to John Paul's first speech in the Sistine Chapel alter his election, "For him, how unexpected and how painful." The new pope's first words to his colleagues were, "May God forgive you for what you have done to me."