Mayor Marion Barry, raucously jeered and booed off the stage by fired city workers at a jobs fair last week, is facing his most severe confrontation with organized labor since last year's long and bitter teachers' strike.

The dispute centers narrowly on the level of pay increases to be granted city workers for the 1981 fiscal year, which begin Wednesday, and on Barry's efforts to ease the city's financial crisis by laying off hundreds of municipal workers. Friday's reaction to Barry's speech at the Mayflower Hotel was the stormiest encounter Barry has had over his cost-cutting measures.

But also at stake are Barry's reputation as a friend of labor, and the possible future course of the mayor's relationship with the unions, a key constituency in city politics and a major component of the city's work force. Barry was elected in 1978 with key support from the District's three major public employe unions, those representing police, firefighters and teachers.

"We got him elected . . and Barry's turned on us," said Larry Melton, vice president of Local 442 of the International Brotherhood of Police, which represents the District of Columbia's 4,000 police officers. "It's a shame."

Along with the firefighters' and teachers' unions, the police officers supported Barry's successful 1978 mayoral bid, largely because of his efforts to win automatic pay raises for the unions while he was an at-large member of the City Council. Now all three unions are opposing Barry's attempt to keep pay raises for city workers far below those scheduled for their counterparts in the federal government.

In the past, District of Columbia workers have received the same pay increases as federal government employes. This year, for the first time, D.C. government salaries are not tied to federal pay levels and the city is supposed to negotiate with city unions over pay, but the bargaining mechanism is not yet in place, and formal bargaining has not begun.

The unions contend that since it is not their fault that the bargaining system has not been established, they should receive the same 9.1 percent pay rais as federal workers are getting. If that is not possible, they say, then at least the city should arrange for some type of bargaining to commence.

Barry's position has been that because of the city's massive budget crisis, which already has resulted in more than 1,000 workers being laid off, the city can afford to give only a 5 percent increase. And because the bargaining system is not in place, Barry says, there can be no true negotiation.

"As president of the school board, Barry got along well with teachers," said Joslyn Williams, head of the political arm of the Greater Washington Central Labor Council. "When (Barry) was a council member, he argued for parity between D.C. workers and federal employes. He sees things differently now, (but) we don't know what caused him to change."

Some union leaders have said that their membership will not settle for the 5 percent. They complain bitterly about the city government layoffs already ordered by Barry, and some privately predict work stoppages, slowdowns or wildcat strikes if the mayor sticks to what they see as a hard-line position. They say they are just as unhappy with the City Council, which last week rejected legislation that would have called for granting the 9.1 percent increase if the necessary money could be found.

"We could not accept 5 percent," said Geraldine Boykin, head of the union that represents 16,000 city workers, about half the total number. "That's not a decent and acceptable cost-of-living increase for the employes."

Asked if she expected work actions to protest the mayor's position, Boykin, chairman of District Council 20 of the American Federation of State, County and Municipal Employees, said, "We don't want to see anything happen to impede the progress of the community, but on the other hand we don't want to be run out of the city, either. The employes can't live with 5 percent. They're not going to accept that."

Barry's relations with the unions once were friendly enough that he was able to use his personal influence to establish "movement" during the acrimonious month-long teachers' strike in March 1979, and to take credit for ending the walkout. Those relations "have just deteriorated over the last eight months," according to Melton.

"It's almost as if he used the unions just to get elected," Melton said. "It seems to us he is out to destroy labor unions in this town."

Barry's general assistant and chief political aide, Ivanhoe Donaldson, said the strong words from local labor leaders were merely a result of the bargaining and pay raise dispute, and that relations between Barry and the unions were "in general, fairly friendly."

"Relations with labor unions are cyclical," Donaldson said. "They depend on what's on the table at the moment. Whenever you have talks going on around things as critical as pay, there are going to be tensions. This is not necessarily the best of times to evaluate relationships."

The city's chief labor negotiator, Don Weinberg, who has met with several of the unions but refuses to call the meetings bargaining sessions, said, "If the unions think their members deserve more than the mayor can afford, there's a strain, but it doesn't mean a break. It's like a marriage. It may have its strains, but you come back to a point where you say it makes more sense to stay together than to split up."

Labor leaders have complained of other incidents that have damaged their relationship with Barry. Several sources have said that Barry agreed last spring to support Washington Teachers' Union president William Simons as chairman of the D.C. Democratic State Committee -- the policy-making body for the local Democratic Party -- and later reneged on the promise. Barry and Donaldson both have denied that Barry ever made a promise, but the dispute did cause bad feelings between Barry and Simons and was seen by some union leaders as part of a pattern of insensitivity to organized labor on Barry's part.

While the mayor's approach of layoffs and limited pay raises for city workers has drawn fire from the unions, it has been applauded by some members of another influential constituency in the city, the business community, which long has believed the District of Columbia bureaucracy is too large.

"My own view is that he's making the right, hard decisions," said R. Robert Linowes, a politically active lawyer and an influential member of the Greater Washington Board of Trade. "You can't give out something that isn't there to be given."

One business leader said that Barry has won increasing respect from the business community for his determination to balance the city's budget, even if layoffs and a hard line on wages are necessary.

"He (Barry) has been consistently moving toward a responsible posture," said the business leader, who asked not to be identified. "At first, both he and we were very standoffish and somewhat distrustful. I think that began to change and is changing. I think there is a growing belief in his course of action, and his credibility has substantially increased."