Iranian leader Ayatollah Ruhollah Khomeini today sharply criticized the government of President Abol Hassan Bani-Sadr and threatened to call upon the people to overthrow the president's administration.

It was the first time that the Islamic leader, the ultimate authority in the country, had directly attacked Bani-Sadr, who was elected in January.

The sting of the attack, however, was somewhat lessened for the president because Khomeini included in his criticism the ruling Revolutionary Council, which is dominated by Bani-Sadr's clerical rivals.

The 80-year-old ayatollah's emotional warning centered on the vestiges of the rule of the ousted shah, Mohammad Reza Pahlavi, in postrevolutionary Iran, almost a year and a half after the monarch fled the country.

Khomeini, speaking at his home to a group of Iranians disabled during the revolution that toppled the shah, often seemed to lose his train of thought amid his anger.

In a reference to the government, he said, "I will ask the nation to do the same with you that they did with the shah," if government offices have not replaced stationery, calling cards and other accessories bearing the lion-and-sun symbol of the Pahlavi dynasty within 10 days.

He also attacked the government for failing to purge officials of the former regime, for slowness in helping victims injured by the shah's police and military and for corruption and bureaucratic practices in the various ministries. He limited the 10-day deadline, however, to getting rid of the imperial insignia.

Speaking outside his home to the invalids, who have not been compensated for injuries suffered at the hands of the shah's officials, Khomeini asked: "Why is the president not [intervening] in this, why is the Revolutionary Council not looking into the matter?"

"Despite repeated warnings and recommendations that they would not engage themselves in this dirty paper work and these kinds of antirevolutionary acts," he added, they are still "creatiang problems for you. Why don't they pay any attention to these problems?"

Khomeini also showed annoyance at the political maneuvering between Bani-Sadr and the clerical-based Islamic Republican Party, led by Ayatollah Mohammad Beheshti, which has delayed the functioning of the newly elected parliament and the selection of a prime minister. The party has a majority in parliament.

"You cannot always pacify the people with your words," Khomeini said. "How long can the Iranian nation wait for you to solve the [country's] internal problems? One-and-a-half years have passed since the revolution and still the same inferior people [as served the shah], are working," he complained.

Diplomats noted that Khomeini's remarks today were an escalation of the ayatollah's recent moves to take a stronger, more direct role in the government following his recovery from a heart ailment. "He is saying he is still capable of cracking heads, that he's not asking anything impossible," just the removal of the shah's insignia, a source said.

Many of the outward trappings of the shah's 25-year-old rule have been removed from Tehran. Monuments have been destroyed and streets bearing the names of the Pahlavi family have been renamed to the point where it is often difficult to find an address.

Most money and stamps, which are printed in Europe, still bear the image of the shah, however. A recent v isitor to the conference room used by Foreign Minister Sadegh Ghotbzadeh noted that there were still ashtrays in use with the imperial insignia.

The conflict between Bani-Sadr and Beheshti escalated earlier this month with a reading of a private speech by a key Beheshti supporter that included threats to oust the president.

Bani-Sadr was in the central city of Shiraz today where he said in a speech reviewing his four months in office that his government's major efforts were devoted to the struggle against U.S. sanctions.

He said his government had succeeded to a large extent in overcoming the problems and providing the country with raw materials and products, the Pars news agency said.

In other developments today, Barbara Timm, mother of the youngest of the 53 American hostages held here since Nov. 4, arrived in Paris to seek a visa for a second visit to Iran.

Timm's lawyer, Carl McAfee, said his client was on a humanitarian undertaking for all of the hostages.

Timm, of Oak Creek, Wis., is the mother of 20-year-old Marine Sgt. Kevin Hermening. She received a waiver from U.S. officials that exempts her from President Carter's ban on travel to Iran by most Americans, which took effect just after her first visit to Tehran in April.

Meanwhile, Iranian news media reported that 21 more Iranians had been executed for political and common crimes.

Tehran Radio said five men, including an ethnic Arab doctor and three women were executed in Ahwaz, capital of the country's oil-rich Khuzestan Province, early today, the men for sabotage and treason and the women for prostitution and drug trafficking, the Associated Press reported.

The officials news agency Pars said firing squads executed 12 narcotics traffickers, including a woman, and a former agent of the shah's secret police in the northeastern city of Mashhad.

The rate of executions in Iran has increased dramatically since a roving Islamic judge, Ayatollah Sadegh Khalkhali, launched investigations into drug trafficking last month.

Since May 21, more than 200 people have died before firing squads, about 130 of them sentenced by Khalkhali.