President Anwar Sadat, in an unexpectedly caustic attack on Egypt's largest benefactor, charged yesterday that Saudi Arabia paid off other Arab nations to sever diplomatic relations with Cairo in protest of the peace treaty with Israel.

Sadat's sharp criticism, in a May Day speech at the Red Sea town of Safaga, seemed startling because his harsh words raised the risk of economic reprisal from the Saudi rulers whose largesse has been an important factor in keeping the Egyptian economy afloat.

Sadat's remarks, broadcast on Egyptian radio and relayed by news agencies, reflected growing irritation at the hostile reaction his peace initiatives-culminating in the treaty signed March 26-have genreated throughout the Arab world.

Sixteen Arab countries and the Palestine Liberation Organization have broken relations with Cairo after the peace moves, leaving only Sudan, Oman, North Yemen and Somalia with ties from among the 21 Arab League members besides Egypt.

Sadat suggested that some governments that broke off ties with Egypt were reluctant to do so but were seduced into opposition to the treaty by promises of a cut of Saudi Arabia's oil wealth.

He accused the Saudi government led by King Khalid and Crown Prince Fahd of "rushing after Arab countries to sever diplomatic relations with Egypt." Some of the those that did, he added, made the decision "as a gesture of courtesy to Saudi Arabia, or were paid the price by Saudi Arabia."

"This is something for which they shall have to pay dearly, and I am not referring to money," Sadat said.

Several countries have informed Egypt secretly that they followed the tide of Arab criticism only because of Saudi influence and asked for understanding, the Egyptian president said. He named none of the countries . Saudi Arabia's wealth and prestige, however, long have given the kingdom a preponderant voice in Arab councils.

For this reason, Saudi Arabia's announcement last Monday that it was breaking diplomatic relations with Egypt in line with Arab decisions to oppose the treaty was greeted with some concern in the United States. Despite the Saudis' consistent skepticism on the treaty, the Carter administration was hoping for at least passive acceptance of Sadat's peacemaking.

It was noted then, however, that the Saudi announcement said nothing about ending economic assistance. Egyptian Defense Minister Kamal Hassan Ali estimated recently that Saudi Arabia has been contributing roughly $1.5 billion a year to Egypt through a variety of channels. In particular, Saudi Arabia has pledged to pay for 50 F5E jet fighters the United States has agreed to sell Egypt, originally priced at $523 million but since said to have gone up.

Sadat said Saudi Arabia's diplomatic break "has no importance." But he hinted that Saudi and other Arab aid sources may change their minds about financial assistance.

"Arab aid to Egypt is minimal but we will reconsider our calculations," he contended, adding that Suez Canal revenues and oil sales from Sinai fields to be recovered from Israel will make up any aid losses. Whatever inconvenience this might cause, he said, Egypt will persevere in its commitment to carry out the peace treaty with Israel.

"Every time Israel takes one step forward, we shall encourage her and take two steps forward," Sadat said in the address, which lasted nearly two hours. "I tell Saudi Arabia: Egypt will not go back. The peace process will not go back. The peace process will not stop under any circumstances. The business of severing relations will not impede us. It will not affect Egypt's prestige leadership, strength and economy."

Sadat also renewed his ridicule of hard-line Arab opponents such as the leaders of Libya, Iraq and Syria. As he has before, he referred to them as "dwarfs," and, in a new addition to his vocabulary of denunciations, as buzzards." For Col. Muammar Qaddafi, the Libyan leader, he reserved his favorite: "the Libyan lunatic."

Such talk has become familiar in speeches against his most outspoken opponents. Sadat's tactic ever since his trip to Jerusalem in November 1977 has been to meet criticism from fellow Arabs with even stronger criticism.

But the accusations against Saudi Arabia were something new. The Riyadh government's role as donor and its reluctance to openly criticize Sadat had previously immunized it from Sadat's pique. Saudi agreement to the Arab boycott of Egypt decided March 31 at the Arab conference at Baghdad apparently changed that.

Another possible cause of Sadat's tough attitude was an announcement by Kuwait's foreign minister, Sheik Sabah Ahmad, that Sudan was wavering in its support of Egypt. Similar claims have come from Libya. But nothing has emerged from Sudan itself and President Jaafar Nimeri is reported to remain staunchly with Sadat.

At the same time, some members of the Sudanese government are known to feel nervous about their isolated stand and the Kuwaiti and Libyan announcements were seen as attempts to enhance and magnify their douts.

In Tehran, meanwhile, the Iranian Foreign Ministry went along as expected, with an order by Ayatollah Ruhollah Khomeini and severed relations with Egypt, citing the peace treaty with Israel.