The most powerful black member of the U.S. Congress charged at the end of a four-day visit here today that the South African government still fails to understand the depth of black feelings in this country.

Rep. William H. Gray III (D-Pa.), chairman of the House Budget Committee, declared that the Reagan administration had contributed to this lack of understanding by giving the South African leadership a "false sense of security."

Gray said he was deeply pessimistic about South Africa's future.

He charged that President Reagan's failure to accept Congress' bipartisan antiapartheid bill last year had caused the Pretoria government to misread the strength of American views about its segregationist policies and had "caused confusion" among government leaders here about American intentions.

"It has made them feel that what happened last year was some kind of aberration, a passing phenomenon, and that before long relations between South Africa and the U.S. will return to normal," added Gray, the chief House sponsor of the antiapartheid bill.

A group of six congressmen, headed by Gray and including D.C. Del. Walter E. Fauntroy, left for home tonight after meeting more than 200 persons, from right-wing whites to radical blacks and including President Pieter W. Botha, in their four-day visit.

"What we have heard from all these diverse people has convinced us that Americans made the right decision in 1985," Gray said in a statement at Johannesburg Airport before the group left. "We leave with a commitment that backing apartheid with American dollars is wrong."

As the Americans left, Fritz Leutwiler, a Swiss banker engaged by Pretoria to try to negotiate a rescheduling of South Africa's frozen $24 billion foreign debt, arrived on another mission seeking evidence of reformist intentions.

Leutwiler, who has a schedule almost as intense as the congressmen's and who will be meeting with President Botha Saturday, has emphasized that he stands little chance of being able to persuade creditor banks -- especially American banks -- to accept a rescheduling agreement unless South Africa commits itself to substantial political changes.

Leutwiler has explained that the banks are under heavy domestic pressure not to support apartheid.

The Swiss banker has said that he is visiting South Africa to persuade the government of the necessity for reform ahead of a meeting with the creditor banks in London next month. He said at a press conference in Pretoria today that he was "very hopeful" of being able to resolve the debt problem.

U.S. Assistant Secretary of State Chester A. Crocker is also due to visit South Africa Sunday for talks with Botha about the outlook for political change.

The spate of meetings is taking place ahead of the start of the South African Parliament's 1986 session, when Botha will have an opportunity to state his intentions in a major state-of-the-nation speech on Jan. 31.

Members of the congressional group say Botha gave them little encouragement during their 90-minute meeting with him Wednesday.

The South African government, if not its press and public, showed an appreciation of the group's status in American politics. One local newspaper dismissed the congressmen in an editorial today as "insignificant" compared with Leutwiler, but both President Botha and Foreign Minister Roelof F. (Pik) Botha gave the group more than twice the allotted time in their meetings.

Yet, Winnie Mandela, wife of imprisoned African National Congress leader Nelson Mandela, and leaders of a black consciousness party called the Azanian People's Organization all refused to meet with the congressmen.

The black consciousness group's decision was no surprise. It is trying to project an image of anti-American and anticapitalist militancy and was the group that led demonstrations against Sen. Edward M. Kennedy (D-Mass.) when he visited South Africa last year.

Mandela's refusal was more puzzling, as she met with Kennedy and has been warm in her praise of the U.S. Congress' attempts to enact antiapartheid legislation.

A source close to Mandela said tonight that her failure to respond to the group's request for a meeting was intended as a "mild rebuke" for the congressmen's failure to schedule a visit to the ANC at its headquarters in exile in Lusaka, Zambia.

"Winnie Mandela is determined not to be treated as a subject for humanitarian concern separate from the ANC," the source said.

In an interview tonight, Gray said the group did not have time to visit the ANC headquarters.

"It was our feeling that it was most important to meet with the persons here in the country," Gray said, adding that the group had spoken with many people strongly supportive of the outlawed ANC.

Gray, who last visited South Africa five years ago, said in the interview that he had been struck by the "overwhelming sense of expectation" that the violent conflict of the past 16 months had generated in the black majority here.

"This is not to say that five years ago people in Soweto didn't want change, but today it is as if it had better happen like right away. There is a sense of now-ness -- that if it doesn't happen now it will be too late, and there will be a disaster," Gray said.

He said he had also been struck by the "tremendous alienation" caused by the government's oppressive measures and the killing of more than 1,000 black people.

A third impression was of "a communications gulf" between black and white.

"There is no understanding, no dialogue, no hearing," Gray said. "The whites are just not hearing the aspirations, the now-ness, of the black majority.

"They are talking about the trouble coming from outside, from beyond the country's borders. More thoughtful people among them are saying, 'Yes, we have a problem, but it is very complex; we must move carefully.' They say they are worried about the violence. It becomes a crutch, an excuse for inaction."