Foreign Minister Moshe Dayan resigned from Israel's government today, complaining that he had been frozen out of the West Bank and Gaza Strip Palestinian autonomy talks because he disagrees with the policies of Prime Minister Menachem Begin's rightist Likud coalition.

Dayan's surprise announcement at a meeting of the Cabinet stunned most of the other ministers and immediately posed far-reaching questions about the future of the stalled Middle East peace negotiations and about the direction of Isreal's foreign policy under the guidance of a possibly less pragmatic and adaptable minister.

Begin will assume the ForeignMinistry portfolio until Isreal's parliament, the Knesset, approves successor.

While there were no indications that Begin's fragile and deeply divided parliamentary coalition was in imminent danger of coming unraveled because of Dayan's resignation, it was clear tonight that it would exacerbate the underlying differences within the government over Isreal's policy toward the future of the 1.1 million Arab inhabitants of the West Bank and Gaza Strip.

Dayan, it was disclosed today, informed Begin on Oct. 2 that he intended to quit, and the prime minister met with him three times to try to change his mind. Under an Israeli law designed to discourage precipitous regisnations, Dayan's notice does not become effective for 48 hours, or on Tuesday afternoon.

Sources said Dayan's health did not figure in the decision. Dayan recently underwent surgery for the removal of a malignancy of his intestine.

There appeared to be several alternatives facing Begin: keeping the Foreign Ministry portfolio himselft and assigning a deputy to manage, the day-to-day affairs; appointing another moderate to the post, possibly Deputy Prime Minister Yigael Yadin; and taking the risky step of completely reshuffling the Cabinet and naming to the top Foreign Ministry post someone whose ideology and attitudes toward the occupied territories is more akin to his own hard-line views.

A Cabinet reorganization, informed political observers said, would run the risk of snowballing series of defections and the possible collapse of the Likud coalition. The coaition, through gradual political attrition, has slipped alaready from 77 Knesset members to 65.

Cabinet sources said that although Dayan's letter of resignation to Begin was couched in circumspect language, narrowing the dispute to approaches to the autonomy talks, the underlying argument reflected an ideological gulf between the former Labor Party official and the rightist prime minister.

Dayan's letter to Begin also noted that the foreign minister had voted against the Likud majority on expropriation of Arab land for Israeli settlements in the West Bank against the controversial settlement of Elon Moreh near Nablus. Dayan had said he ould quit the government if it voted last week to use private Arab land to expand seven West Bank outposts. v

Sources said that Dayan in recent weeks had privately proposed -- and Begin had rejected -- several bold steps revive the dormant autonomy talks, including an immediate unilateral withdrawal of the military government from West Bank Arab cities, a speed-up of the autonomy process and the beginning of negotiations with Western countries and religious institutions on the subject of East Jerusalem.

As if signaling to Begin the seriousness of his concern, Dayan on Friday night suggested the military withdrawal scheme in a slightly modified form, saying in a television interview that it would attract Palestinians into the talks and prevent a breakdown of the autonomy negotiations. Moreover, Dayan for several days had been making oblique references to the futility of Isreal's continued rule over 1.1 million Arabs in areas captured in the 1967 war.

Some associates of Dayan's said they believe the foreign minister is convinced the Likud government will collapse before the 1981 elections and that he felt his resignation might hasten the moment and somehow salvage the autonomy talks.

For his part, Dayan said only that because of his disagreement with the Likud policy, he felt isolated from the autonomy process and reduced to handling "marginal" foreign policy chores.

"I foundd myself where I was not dealing in the critical issues of foreign policy. I am not heading up the autonomy talks because my ideas do not coincide with the coalition policy," Dayan said in a radio interview.

He said the government should appoint a foreign minister "who has its confidence concerning autonomy and who had confidence in the autonomy plan of the government."

When the Israeli autonomy delegation was formed, Interior Minister Yousef Burg was named to head it and a minsterial committee appointed to oversee policy, a decision that the time angered Dayan. The foreign minister withdrew from active participation in the talks and, characteristically, began talking publicly on his own ideas.

He angered some ministers by broadly hinting -- and then denying -- that he believes Isreal, under certain conditions, should talk with the Palestine Liberation Organization.

He also aroused controversy by meeting with pro-PLO leaders in the West Bank, including a member of the Palestine Council.

Begin, who emerged from the Cabinet meeting today looking drawn and grim, drove away without a word. Later he told reporters that Dayan's resignation was an "important national and international event," but that the government would continue to meet its obligations.

When asked whether Dayan's regisnation would influence Israeli foreign policy, Begin said, "I think we've proceeded in the right direction so far. We've been loyal to our principles . . . Mr. Dayan can express his opinion in the Knesset . . . But I don't see any reason why we should change our policies."

The reaction in the government ranged from outright shock to quiet and unsurprised acceptance, often depending on the political leaning of the person reacting.

Dyan always has been a complex public figure, always a loner and a maverick and always a controversial. When he crossed from the Labor Party to the Likud, many observers predeicted he would eventually resign in a policy dispute.

Former Labor government foreign minister Abba Eban said today, "His mistake was to join the government more than two years ago when it was quite obvious his own pragmatic approach was in total conflict with the ideas of the government concerning [the West Bank] and Gaza Strip. After all, Dayan was elected on the same platform as myself to represent the idea of compromise and peace, and he found himself in a government whose chief objective is to insure permanent Israeli rule over [the occupied territories.]."

Labor Knesset member Yosi Sarid said Dayan's decision should be considered a resignation "from the government's bankrupt policies." He said pointedly that Dayan has always been the first to sense when "the ship was sinking."

Both Labor Party leader Shimon Peres and former Labor prime minister Yitzhak Rabin called on Begin to resign and hold new elections.

However, Justice Minister Shmuel Tamir, who has been mentioned as a possible Dayan successor, said he doubted there would be a Cabinet crisis. Health Minister Eliezer Shostak said, "Ther is no question the government will be weakened, because Dayan was one of the pillars of this government."

Dayan, who fought for Israel in four wars, beginning with the 1948 war of independence, previously had served Labor governments as agricultural minister and defence minister, resigning the latter post amid bitter criticism over Israel's preparedness on the eve of the Yom Kippur 1973 war.

As a military commander, Dayan was admired for his daring and unorthodox operations emphasizing speed and surprise. His military career included service in World War II with a special British commando force. It was in one of the unit's operations that he lost his left eye.