With about five weeks to go before the Democratic mayoral primary, Patricia Roberts Harris is trailing Mayor Marion Barry not only in the polls but in campaign organization--the political nuts and bolts that could decide the outcome of the race.

The tell-tale signs of trouble abound. Barry has a larger, better-trained full-time campaign staff than Harris. Her campaign staff has undergone substantial turnover. Volunteers at times have had difficulty getting assignments to assist in her campaign. She repeatedly has been outflanked by Barry in seeking endorsements.

And even now, with limited time remaining in the campaign, there is some doubt as to who will be in charge of Harris' crucial voter-identification and turnout operations.

"The bottom line is still who can organize and turn out the vote, and at this point I'd be the first to say Marion Barry has the advantage," Sharon Pratt Dixon, Harris' campaign director, said late last week.

"I keep telling people it a campaign organization is coming," she said. "If there's a God in heaven, it'll come soon."

Ivanhoe Donaldson, Barry's campaign manager, agrees with Dixon's assessment. "Her organization is beginning to show some signs of vitality, but it's not as strong as ours," he said.

Some of Harris' problems stem from her relatively late entry into the race in April. Also, Barry has built-in advantages as an incumbent to amass a large campaign war chest, collect impressive endorsements and enlist support from volunteers and city workers.

But the Harris campaign has made its share of mistakes as well. Until recently, her campaign was long on political advisers but short on experienced local political workers to carry out the game plan. What's more, the early stages of her campaign were marred by internal bickering and indecision.

In an interview last week, Harris said she had expected problems in assembling a campaign organization before she decided to enter the race.

"In seven to nine months, it is a formidable task," she said. "I decided to go ahead with it, but I am not a politician . . . I have not dedicated my life to organizing or to having people obligate themselves to me. I do things on merit.

"If, indeed, people are satisfied with the status quo, then things will remain the same," she added. "But if they are not, then the problems of organization will not make the difference."

Harris has relied heavily on a small group for political advice. The policy group includes James L. Hudson and Henry Hubschman, both Washington lawyers; D.C. school board member R. Calvin Lockridge (D-Ward 8); pollster Peter D. Hart; political consultant John Marttila, and Dixon, the campaign director.

Dixon, a veteran of local Democratic politics, has given overall direction to Harris' campaign while holding down a full-time job as an executive of the Potomac Electric Power Co. (Pepco).

Recently, she decided to take charge of the faltering voter-turnout operation, but that may not be possible now. Dixon is a witness in a major Pepco rate-increase case recently scheduled for a hearing by the D.C. Public Service Commission later this month. That unexpected development may leave her with little time for the campaign in the final crucial weeks.

"I am a principal witness in the case and my first priority has got to be my job," Dixon said.

If the Pepco case takes Dixon out of the picture, then supervision of voter-turnout activities would continue to be handled by campaign manager Arthur Murphy and consultant Tim Gens, neither of whom has worked on a D.C. election campaign before.

There are other problems as well.

Harris' campaign claims to have precinct captains and volunteers working in each of the city's 137 precincts, but the organization lacks the depth and experience of Barry's. Her paid cadre of 21 organizers and workers is less than half the size of Barry's professional staff of 50.

Harris has opened three ward offices to coordinate campaign activities, while Barry has opened six. She has one aide working with special interest groups, compared to the four Barry campaign aides who spend all their time courting senior citizens, gays, Hispanics and youth groups.

The mayor has used his incumbency to line up endorsements from 11 City Council and school board members, D.C. Del. Walter E. Fauntroy, about 100 ministers, several business groups and the major public employe unions that Harris has not been able to match. While not all of the endorsements can be translated into votes, they add luster to a campaign and contribute to the appearance of momentum.

Barry embarrassed Harris in her own backyard by outmaneuvering her to lock up the endorsement of the Ward 4 Democratic Club recently. He upstaged her again last week when he won the endorsement of the Ward 6 Democratic Club, in another area where Harris hopes to do well.

Some of Harris' aides say it's a waste of time to try to match the organizational superiority of an incumbent mayor. They are convinced she will squeak past Barry on election day on the strength of a groundswell of anti-Barry sentiment and a massive get-out-the-vote effort involving 3,000 to 4,000 volunteers.

Harris, who has campaigned on her record as an effective federal government administrator, has yet to hit upon an issue to galvanize the perceived anti-incumbent sentiment. Her aides hope that a $250,000, five-week television campaign that began Friday evening will serve as a catalyst and get her message across.

Last week Harris admitted surprise at how Barry seems to be growing in strength in the late stages of the campaign.

"I don't understand it," she said. "There seems to be the feeling that he hasn't been a disaster and that he wants the job so much. In fact, what he did wasn't a disaster; it just wasn't very good. People are in a mood that says, 'Let's think about this before we get rid of him.' A year ago there was great dissatisfaction."

Lockridge, who is serving as the unpaid director of Harris' field operations, pooh-poohed the notion that his candidate may be in trouble because Barry has a much larger, paid campaign organization.

"You don't turn your vote out by field organization--you turn it out with media, sound trucks and telephones," Lockridge said.

"You do use your field operation, but that's not where it's won. The election has got to be won before the election day."

But Lockridge conceded that Barry's campaign organization was formidable and gave much of the credit to Donaldson, Barry's campaign manager. Donaldson engineered Barry's surprise primary victory in 1978. He joined Barry's administration as a top assistant and later was appointed by the mayor as acting director of the Department of Employment Services.

"Don't think we're underestimating Ivanhoe Donaldson's ability," Lockridge said. "When it comes to political organizing, you've got a monster on your hands with him."