President Carter, members of the diplomatic corps, and top government officials paid homage yesterday to the late Pope Paul VI at a pontifical requiem mass at St. Matthew's Cathedral.

Carter and House Speaker Thomas P. (Tip) O'Neill, have been at odds recently over the dismissal of O'Neill's friend Robert T. Griffin from a senior government post; sat together in the front row as Bishop Thomas C. Kelly, general secretary of the National Conference of Catholic Bishops, paid glowing tribute to the dead pope.

Carter and O'Neill were joined in the front pew by Mrs. O'Neill and Secretary of State Cyrus Vance. Also present were former CIA director William Colby, who served as an usher at yesterday's services, Rep. Lindy Boggs (D-La.), and Zbigniew Brzezinski, Carter's national security adviser.

Mrs. Carter is in Rome where she will attend the pope's funeral services today.

Speaking without notes, Bishop Kelly recalled the beginning of Paul's pontificate in the midst of the Second Vatican Council, a watershed in recent church history. Bishop Kelly predicted that the late pope will "go down in history" for seeing the council through to completion.

"I feel that the letter of the council was beautifully executed by Pope Paul," he said. "But, most of all, he fulfilled the spirit of the council."

Bishop Kelly predicted that Pope Paul "will be known above all for those marvelous words" that he spoke in his address to the General Assembly of the United Nations in 1965. The words, "Never again war, war never again" said Bishop Kelly, "echo through history to us still."

At the beginning of his homily, Bishop Kelly, addressing the president, thanked him for attending the service. He added that "we are grateful to you for your sending your wife to Rome" to represent the United States at the funeral.

Members of the diplomatic community by far outnumbered members of Congress at yesterday's rite. Most of the diplomats present appeared to be familiar with the Catholic mass, which was celebrated by Archbishop Jean Jadot, the official representative of the Vatican in this country.

President Carter, a Baptist, joined in some parts of the service and sat or stood reverently in others. He even struggled through the Lord's Prayer, which was chanted in Latin by the congregation, reading the Latin words from the order of service distributed to all worshippers.

During the exchange of the peace - when worshippers were invited to shake hands with their neighbors - Carter first grasped the hand of Mrs O'Neill, who was seated next to him, then with a broad grin he and the speaker shook hands

"The president called and asked if (O'Neill) was going and said he'd like to sit with him - and Tip went," explained Gary Hymel, a member of O'Neill's staff, when asked how O'Neill came to be sitting next to Carter. Hymel indicated that the basic differences between the two men over Griffin's dismissal were still not resolved, however, even though the two men rode to and from the service in the presidential limousine.

The president was escorted both into and out of the church, at the end of the ecclesiastical procession, by Archbishop Jadot. The archbishop said later that he had assured the president, as they left the church, of prayers for success at the talks on the Middle East next week at Camp David.

Yesterday's service lacked much of the sense of outpouring of human feeling about the pope that had characterized the hastily arranged service conducted by William Cardinal Baum last Monday noon.

"This one was more official," observed Msgr. W. Louis Quinn, pastor of St. Matthew's.

While a noontime crowd of several hundred waited behind police barriers for a glimpse of the president leaving the church, the faithful who had gathered inside for the mass paid little heed to the political dignitaries.

"I came in honor of the deceased pope," said Helen Curtis, who said she is a member of the church. "I believe in everything that he wrote on birth control and abortions, and all his opinions. I believe God told him what to do."