Mayor Marion Barry came under attack last night from four of his Democratic challengers, who told a crowd of nearly 500 persons at a candidates' forum that the mayor unnecessarily laid off employes in balancing the budget and that he had diminished the city's image through inept administration and unimaginative leadership.

Patricia Roberts Harris, a Carter administration cabinet officer, contended that much of the city's record of progress toward implementation of home rule "seems to be disappearing in the ineptness" of Barry's administration.

Among examples of these failings, she said, were major foul-ups in the city's voter registration system, failure of the city to develop adequate standards for disposing of choice, city-owned property and failure to reduce the city's infant mortality rate, one of the highest in the nation.

"Every day there is a new embarrassment in the newspaper for the District of Columbia," Harris said.

At-large City Council member Betty Ann Kane blamed Barry for unnecessarily cutting back employment in the D.C. Department of Recreation and then telling her in a letter to mind her own business when she made inquiries on behalf of department employes.

And council member John Ray said some of his constituents have wondered aloud how Barry's administration expects to be effective in combatting crime when it "can't properly collect water bills."

But Barry, who appeared confident and at ease before a labor-dominated audience at the International Inn near Thomas Circle, characterized his record as one of increased spending for jobs, housing, senior citizens and the Latino community, and of cracking down on drug dealers along Seventh Street NW.

Warming to the subject, the mayor also urged his audience to disregard his opponents' rhetoric and examine the facts.

"Separate fact from fiction, rhetoric from reality, promises from performance and you will conclude that even though this administration has made some mistakes--and I'm the first to admit it--that a lot of our people are better off in this city today than ever before, the workers are better off, and there will be four more years of no more RIFs," Barry said.

Last night's session, sponsored by the American Federation of Government Employees (AFGE), which represents about 8,000 city employes, was the first major city-wide mayoral forum since all the candidates officially launched their campaigns.

Council member Charlene Drew Jarvis (D-Ward 4) also took part in the forum. Council member John A. Wilson (D-Ward 2), who has said that his campaign was having difficulty raising money, did not attend. Two other candidates who were not invited to participate but were formally recognized as candidates by a union official were publisher Dennis Sobin and physician Morris Harper.

AFGE is not expected to formally endorse a candidate until later, although Barry appears to have considerable support among that union's leadership, according to a union source.

Nevertheless, at last night's forum, Barry indicated that he was opposed to giving public employes the right to strike, and he sidestepped a question about his views on the reduction in benefits for workers through the city's unemployment and workman's compensation laws.

The other candidates in the forum said that they would support public employes' right to strike and opposed changing the unemployment and workman's compensation laws to benefit businesses at the expense of workers.

Jarvis criticized Barry's administration for inadequate job training programs and public health services and for failing to stem a continuing loss of businesses to surrounding communities. "There is a need for a cure and the time for the cure is now," Jarvis said.