Mayor Marion Barry, in a major policy speech yesterday, asked leaders of the city's often feuding business and labor communities to join his government in attaining several mutually compatible goals. He received a generally enthusiastic, though slightly guarded, response.

"Labor needs business and business needs labor. Together we can have a great city and a beautiful city and a city that we all can be proud of," Barry said, continuing the optimistic, healing, though aggressive tone of Tuesday's inaugural speech in a luncheon address to about 2,600 persons.

Barry said it was in the interest of the business community to help decrease the city's relatively staggering infant mortality rate, to provide more jobs in order to hold down taxes and to break down employment barriers for women. Barry raised the possibility of taking the businessmen to court for violating the city's human rights law if there was continued job discrimination against women.

At the same time, Barry said workers in city government would lose their jobs if they did not understand that it was their "duty" to "give service to people." He also urged preferential hiring in nongovernment jobs for District of Columbia residents -- a policy some labor leaders have opposed.

John E. Jacob, outgoing president of the Washington Urban League, said later that Barry, a former militant social activist, may have been received so well because his proposals were reasonable instead of radical.

"Everyone had expected 'Marion the Wildman' to be Marion the wild mayor," Jacob said. "It's a rarity to see a Marion Barry-type have the kind of power he has and also to be reasonable in his offerings to the community for participation... That makes sense and is very politically astute. It's also good for this community."

Barry's speech during the luncheon, at which vice President Walter Mondale appeared as an unscheduled special guest, was interrupted numerous times by applause and cheers.

"It was fantastic," lawyer Ben Evans said afterward, impressed "for selfish reasons" with Barry's expressed interest in economic development in Anacostia. I think he said everything that should have been said."

Very impressive," said GEICO vice president Eugene Meyung. 'It was constructive, fresh-looking and responded to the problems of the city."

Robert Peterson, president of the Greater Washington Central Labor Council, the area's largest umbrella group of workers, praised Barry's cooperative tone, but added, "We all know each segment here has its own agenda."

Ron Richardson, executive secretary-treasurer of Local 25 of the Hotel and Restaurant Employes Union, said he was "very, very hopeful... But I don't want anyone to think that we've been lulled into believing that there isn't still a war going on between labor and capital."

One further indication of caution toward Barry's broad-based approach came from City Council member John A. Wilson (D-Ward 2), chairman of the council's crucial finance and revenue committee, which writes most of the city's tax laws.

"It was a great deal of innuendo and I'm still more interested in where we're going on particular issues," Wilson said. "I believe everything he said. I just want to know how we're going to get there. The difficulty is knowing what it's going to cost in terms of money."

Barry's speech, which the new maor tried to protray as a turning point between the hoopla of inauguration and the hard work of leading the city, highlighted the final official inaugural activity -- a $30-a-plate luncheon at the Washington Hilton Hotel.

Mondale, who had been unable to attend a reception at the District Building on Tuesday because of scheduling problems, spoke for about 10 minutes. He called Barry "one of the most exciting new public leaders in the United States today."

Speaking while poeple were eating, and giving what he lightly termed "my most nutritious oration I've ever delivered in my distinguished career," Mondale said Barry's inauguration had "captured the imagination, the spirit of the people of the nation and the city."

Mondale said the Carter administration would continue working with the city's leaders through a special task force on District of Columbia problems established in 1977. He said the administration also would work for swift ratificaion of a proposed constitutional amendment granting D.C. full voting representation in Congress. Three of the necessary 38 states have ratified the proposed amendment.

Barry said his administration would seek U.S. funds to modernize many of the city's housing projects. "The District of Columbia government is the city's biggest slumlord. We have more housing violations in our own houses than ever before," Barry said.

Many of the projects were poorly built in the first place, he said. "But we have them. We can't tear them down so we ought to make them livable, and this government is determined to do that," Barry said.

Barry received strong applause and cheers when he pledged t make it easier for builders to obtain necessary permits without long waits and without people seeking licenses for small home improvements having to stand in the same line with developers of multimillion dollar buildings.

"It is the duty of public servants to give service to people. Those in this government who won't do it won't be there long, civil service regulations notwithstanding," he said.

Barry also urged more tourism as a way to generate revenues for the city, completion of the full 100 miles of the Metro subway system with suburban jurisdictions paying "their fair share," and a "strong positive and educational system in the city, "including building of the Mount Vernon Square campus of the University of the District of Columbia.

In urging more support for minority businesses, Barry mentioned the minority-owned Harambee House Hotel on Georgin Avenue NW, whose outgoing president is to be one of Barry's top aides -- Assistant City Administrator-designate James O. Gibson.

"We want people staying there and coming there and participating there," Barry said.

That remark irked Richardso, whose union has tried to gain recognition at the hotel.

Barry also announced yesterday that the city had been awarded a $3.2 million grant from the Department of Housing and Urban Development to build a shopping center on the old Hechinger's hardware store site in Northeast Washington.