Saudi Arabia's King Khalid appears to be gravely ill, and Western analysts here have concluded from a series of developments today that the Saudi royal family is preparing for an imminent succession to his rule.

The analysts base their conclusions on these events:

All the Saudi Cabinet ministers who were abroad rushed home today.

The Saudi government asked France to postpone the three-day visit of Prime Minister Raymond Barre scheduled to start Saturday "because of King Khalid's state of health," a French official announcement said.

Since Barre was not scheduled to see the king, French officials have concluded that the postponement means that other leading Saudis, such as Crown Prince Fahd, the Saudi prime minister, will not be available to see Barre.

It was confirmed that Dr. Medhi Razavi, a cardiologist and Dr. William Kaiser, a urologist, are on their way to Saudi Arabia from the Cleveland, Ohio, Clinic. Khalid, 66, has been a patient at the clinic.

Infored sources in the United States said, however, that Razavi and Kaiser were scheduled to visit Saudi Arabia anyway, and their trip was not part of any emergency treatment.

[The White House was informed of the king's sudden illness Sunday afternoon and had been following developments in Saudi Arabia with concern, Washington sources said.]

Postponement of Barre's trip was not announced today in Saudi Arabia. The Saudi health minister, Dr. Husein Jazairi, said the king merely needed a checkup ater a slight indisposition that was "the result of over-exertion while he was on a picnic."

The king "only needs a few days rest," he said. But official sources here were taking the other evidence of concern that Khalid's health far more seriously than the reassuring words.

"Everything is taking place as if they are convening the grand council to name a new king, if he dies," said a French official.

The king is known to have been hunting with this brother, Defense Minister Prince Sultan, in north Saudi Arabia for about three weeks.He returned to Taif last week for official meetings with King Hassan of Morocco and reportedly with President Hafez Assad of Syria. He then went back north to resume hunting last weekend and was suddenly rushed to King Faisal hospital in Riyadh Sunday.

Saudi sources told foreigners that the king's condition has improved but that he is still in danger.

Khalid suffered a heart attack in 1970 and underwent open heart surgery at the Cleveland Clinic in 1972. He returned to the clinic in 1978 for a six-hour, double-coronary bypass surgery.

A change in government would come close on the hees of the crisis in Saudi Arabia caused by the takeover of the Grand Mosque in the holy city of Mecca in December. Saudi authorities had a great deal of difficulty quashing that rebellion.

There seems no doubt among informed observers that the council of family elders, made up of about a half-dozen of the 32 half-brothers who head the huge Saud family, would name Crown Prince Fahd to succeed Khalid if he died or were forced by illness to abdicate.

Interest centers around who would be named the next crown prince. The leading candidate is considered to be Prince Abdullah Abdel Aziz, the head of the National Guard. He was hastily summoned home from Syria today.

The others were Sheik Ahmed Zaki Yamani, the petroleum minister, who hastily left a conference in London of the Organization of Petroleum Exporting Countries, and the foreign minister, Prince Saud, who hastily returned from a skiing vacation in Switzerland.

Despite his seniority, Prince Abdullah seems to have two disadvantages. One is that he has a severe stammer that makes it difficult for him to make public addresses. The other may be the role of the National Guard in the uprising at the Grand Mosque.

The guard was originally assigned to flush out the rebels from the mosque but it was hurriedly withdrawn and replaced by its rival, the regular Army, because the rebel leaders included several fomer National Guard officers, French sources say. A large portion of the rebels' arms were stolen from National Guard armories, they say.

Prince Abdullah's main rival is said to be Prince Sultan, who is described by knowledgeable sources as extremely able and ambitious. Well-informed Saudi observers say that it is entirely conceivable for the family to name Abdullah crown prince to satisfy his strong sense of his personal rights without intending actually to make him king later. The crown prince's succession to the throne is not automatic. h

Crown Prince Fahd and Prince Sultan are both full brothers of the Sudeiri family, the most powerful group in the 5,000-member royal family. The Sudeiris include seven brothers who, in addition to the premiership and the defense minister, also number interior minister and the governor of the capital of Riyadh.

The Sudeiri brothers, who have been the champions of a modern administration for the kingdom, are allied to the growingly important class of technocrats educated in Western universities.

Close students of the government say that there are signs that the other princely clans have been forming a working coalition around Abdullah to counterbalance the seven Sudeiri brothers, whose eldest is Crown [WORDS ILLEGIBLE]

French officials have concluded from intelligence reports that the Saudi royal family could well be overthrown in the next few years. Uncertainties about who would fill key posts, such as prime minister and the crown prince spot, in any new government contribution to the instability, they say.

Despite Saudi denials and reports from other Western diplomats there, the French support their views with reports that the rebellion in Mecca was part of a complex plan for simultaneous uprisings throughout Saudi Arabia, which were headed off by the government at the last minute.