Eleven months of international condemnation and Afghan armed resistance have hardened Soviet attitudes to the point that withdrawal of Moscow's troops from Afghanistan is an increasingly remote possibility, Indira Gandhi has concluded.

The Indian prime minister voiced this pessimistic assessment on the eve of her talks here with Soviet President Leonid Brezhnev, who arrives Monday on his first trip to a noncommunist nation since Soviet troops invaded Afghanistan last December.

In an interview with The Washington Post, Gandhi said she would reassert to the Soviet leader India's hopes that a political solution can be found soon in Afghanistan and Soviet troops withdrawn. But she acknowledged that her earlier hopes for a speedy Soviet departure have dwindled to almost nothing.

"It seems to be getting more and more difficult," she said in a discussion in her office immediately after she had been briefed by her ambassador to Afghanistan, who was called home this week for consultations. "The outcry, and the feeling that everybody was ganging up against them, have caused them [the Soviets] to dig in their toes."

Gandhi's view on Afghanistan matches Western assessments that the Soviets are becoming more deeply involved in Afghanistan as time passes rather than finding a way out. But this assessment carries even more significance when publicly enunciated by India, which is the Soviet Union's closest noncommunist friend and which earlier predicted that the Afghan crisis and the resulting Soviet occupation could be resolved politically.

While she spoke forcefully and in detail when asked about her domestic programs for India, Gandhi was restrained and often somber as she touched on international issues during the hour-long discussion, her first extended interview since returning to power in last January's elections. Among other points made:

She fears that the increasing Western naval presence in the Indian Ocean -- an increase triggered by instability in the Persian Gulf -- will draw a matching buildup of Soviet forces and produce "a likely confrontation" on India's doorstep.

The nonaligned movement, which her father, Jawaharlal Nehru, helped found, has been seriously weakened in recent years and needs to find new cohesion. India hosts the nonaligned foreign ministers' meeting in February.

American-Indian relations are likely to remain at a tentative level because both Republican and Democratic administrations fail to give India a proper place in America's global outlook. She declined to give any specific suggestions on how these relations might be improved after the Reagan administration takes over.

Commenting on Indian domestic affairs, Gandhi asserted that her administration is getting the country back on track after three years of misrule by her parliamentary oppostition. But even in sounding this brighter note, she said India's internal economic and political disarray and the spread of violence was far greater, and more intractable, than she had expected.

She blamed the opposition parties for stirring up demonstrations against her Congress-I government, but she gave no clear indication that she would again turn to the kind of authoritarian measures she adopted under emergency decrees before being defeated in elections in 1977.

Throughout the interview, the 63-year-old prime minister offered few initiatives for the serious domestic and international problems she described. On matters ranging from the North-South economic dialogue to civil disorder in the Indian state of Assam, she parried questions about specific steps by saying she did not see immediate solutions that she could describe.

This diffident approach scarcely suggested the image of an internatinal activist that had enveloped Gandhi in her previous 11 years of rule, when she strode confidently on the world stage, guided India through a successful war with Pakistan and was typed as a leader who thought in uncompromising blacks and whites rather than in the muted tones she conveyed this week.

Seated behind a neatly cleared desk in her modest office in India's Parliament House, Gandhi showed signs that she is reasserting herself in governing, however, after a period of shock and mourning that followed the death in June of her 33-year-old son and political heir apparent, Sanjay Ganghi, in a small airplane crash.

She will receive her first major diplomatic test since then by the four-day visit by Brezhnev. The Soviets can be expected to play up the visit of the Soviet leader to a key nonaligned nations even while 85,000 Soviet troops are occuping a nearby member of the nonaligned movement.

Brezhnev is bringing more than 300 Soviet officials with him and live television coverage will be beamed back to the Soviet Union. No agenda has been published for the talks, but an increase in the large industrial development aid Moscow has supplied to India has been mentioned as likely by Indian newspapers.

A cordial welcome now from India for the Soviet leader who has sent troops into South Asia, and who could send troops into Poland at any moment, would be an important propaganda boost at home for the Soviets. But Indian officials say privately they expect a restrained public reaction, and Gandhi's remarks on Afghanistan also pointed toward a subdued mood here.

Afghanistan looms large over the talks however.

"We can hardly avoid it," Ganghi acknowledged with an air of resignation and a frown that suggested a wish that the problem would go away.

Diplomatic observers here predit that Brezhnev may try to stiffen India's resistance to pleas from South Asian and nonaligned states to join them in unequivocal condemnation of the Soviet occupation, and the current Kabul administration, it supports.

Despite its refusal to condemn the Soviet invasion directly, India has moved from an initial understanding attitude to a quietly critical stance. Ganghi's remarks offered the clearest official indication yet given on that evolution, while blending with it a large amount of justification for the initial Indian attutude.

"Somebody who came from there" at the time of the Soviet action "said initially when the Soviet troops came they were welcomed, that it was a cause for celebration," Gandhi said, because they had come to remove the government of Hafizullah Amin, the Afghan Marxist leader killed in the takeover. Gandhi said that Amin was hated in Afghanistan because is government had killed large numbers of people.

"At that time, if nothing else had happened, if there had not been any outcry, mayby having helped the government they wanted to have they would have gone away. I don't think they wanted to remain," she said.

"But I think the outcry and the feeling that everybody was ganging up on them caused them to dig in their toes," she asserted, adding that the international uproar also gave the Afghan people "the idea that these people had not come for a temporary period. Once they had that thought, they were bound to react."

Until now India has urged other countries in the region to talk to the Soviet-installed government of Babrak Karmal in Kabul to find a political solution, and Brezhnev is likely to seek a reaffirmation of this stand from Gandhi. But her view that a political solution is becoming "more and more difficult" to obtain suggests that she will no longer bring any enthusiasm to the idea of a broader acceptance of the Babrak government.

The present Western naval build-up in the Indian Ocean is another cause for concern in the region, she said, because it may well draw countermoves by the Soviets "to safeguard what they consider their own interests."

Asked about the nonaligned movement, which India has championed for a quarter century, Gandhi was surprisingly pessimistic.

"Personally, I think the movement expanded too much and included people who are not as nonaligned as they should be," she said. This contributed to the movement taking up divisive political issues instead of concentrating on common problems, particularly economic ones. "So, the movement has been weakened," she said.

India, she asserted, has regained the international stature that had been eroded while she was out of office.

"India is the only country in this region which can play a role for peace and stability," she said, adding that it needs to be left free of outside interference to play that role best.

She said India is trying to improve relations with neighboring Pakistan, but her government is not happy with Pakistani President Mohammed Zia ul-Haqhs mentions of the disputed Kashmir question in Islamic and United Nations forums and with the coverage of India's Hindu-Moslem clashes in the Pakistani press.

On the domestic front, she said demonstrations by farmers in seven Indian states to disrupt road and rail transport in an effort to win higher prices for their crops appeared to be politically manipulated. Gandhi said her government has done more for the farmers than the previous administration, and plans to do even more.

"I can't see why the compulsion is to agitate," she said.

Later in the interview she said that violence in the country had increased during her 33 months out of office.

"I can say when I left there was a feeling of cohesion -- political cohesion, economic stability and discipline -- all of which was gone" when she returned to office in January.

She said she has allowed a national debate on the merits of switching India's British-style parliamentary system to one with a strong president elected independently of the legislature as an attempt to get the average citizen to understand the pros and cons of each.

But Gandhi said she does not favor the change, which opposition critics have charged would allow her to return to the days of her authoritarian rule.

"It's a question of the grass on the other side being greener," Gandhi said, acknowledging that each system has its strengths and weaknesses.