Incumbent Marion Barry holds a commanding 20-point lead over Patricia Roberts Harris in the closing days of the Democratic race for mayor and appears to have cut deeply into Harris' support among whites and middle- class blacks, according to a new Washington Post poll.

Barry was the choice of 50 percent of those interviewed, compared to 30 percent for Harris. Two other candidates, City Council members Charlene Drew Jarvis (D-Ward 4) and John Ray (D-at-Large), trailed with 3 percent and 2 percent, respectively. Fourteen percent of those interviewed for the poll last Wednesday and Thursday said they were still undecided.

The latest poll was completed one day before two major events in the campaign leading up to Tuesday's primary -- The Washington Post's editorial endorsement of Barry and a live televised forum involving all four candidates that was broadcast over WDVM-TV Channel 9.

Sharon Pratt Dixon, director of the Harris campaign, said yesterday that The Post's endorsement of Barry was a "telling blow, but not a killing blow" to Harris' chances. She said Harris' strong performance in the Friday night televised forum may have helped her recoup some ground lost to Barry.

Dixon insisted that a poll recently conducted for Harris' campaign by Peter D. Hart Research Asspciates Inc. shows a much closer and more fluid race than is suggested by the latest Post poll.

"We'll just have to see whose poll is correct," Dixon said.

Barry and his top aides, satisfied that they are far ahead in the race, declined to comment on the latest Post poll. However, Barry told reporters last week he was confident of winning with at least 50 percent of the Democratic votes cast.

Jarvis discounted the results of the poll, arguing that it failed to detect an 11th-hour surge in her support that has been helped by her performance in the televised forum, a mass mailing of campaign literature and the start of her radio advertising campaign last week.

"Harris is dropping and I'm picking up her votes," Jarvis said. "For me the polls are useless."

Ray acknowledged that Barry is ahead in the race, but said he believes The Post poll exaggerated the lead.

"I just don't believe Marion Barry has 50 percent of the voters out there ready to vote for him," Ray said. "It's contrary to everything I found through our telephone bank and talking to people.

"I just hope the poll doesn't discourage people from voting," Ray said. "If they do vote, it will be a real tight race and anyone could win it."

Barry, who is seeking election to a second term, appears to have greatly expanded his political base since late June, when another Post poll showed him holding a 13-point lead over Harris, a lawyer and former Carter administration cabinet member.

Barry demonstrated impressive citywide strength among all age groups, income levels and races. He continues to lead Harris by substantial margins in seven of the city's eight wards. Only Ward 3, an affluent, predominantly white section west of Rock Creek Park, favored Harris in the poll.

At the same time, Barry appears to have neutralized Harris' strategy, which is to galvanize support among middle-- and upper-income blacks in Wards 4 and 5, in upper Northwest and Northeast Washington, and win overwhelmingly among whites in Ward 3 to offset Barry's leads elsewhere.

Barry continues to lead Harris in Ward 4 -- Harris' home base and a ward that traditionally has the highest turnout of Democrats for primary elections -- while substantially increasing his lead in Ward 5, the second-highest turnout ward.

While Harris clearly has improved her standing among voters in Ward 3, from a 4-point lead in late June to an 8-point lead now, she has fallen short of the massive lead she had hoped for there.

One indication of Harris' problem is the swing in the preferences of white voters. In The Post's earlier poll, Harris had a 4 -point lead over Barry among white voters; the advantage has shifted to Barry, who has a 2-point lead among white voters and a 2-to-1 advantage among black voters, who make up the vast majority of the electorate.

Inner- city voters in Wards 1, 2 and 6 remain solidly behind Barry, according to the poll, white Barry's 34-point lead over Harris in his home ward, Ward 7 in far Northeast and Southeast, has slipped by 6 points.

One of Harris' most striking problems during the campaign, according to the poll, has been her inability to rally women voters. In June she trailed Barry by only 6 points, 40 to 34, among women. But in the new survey she is behind by 15 points among women, 48 to 33.

In addition, where Harris and Barry were even in June among voters under the age of 30, Barry now leads Harris among that group by 47 percent to 38 percent.

As the race entered its final days last week, Barry and Harris increased the frequency of their advertising, with Barry laying out $60,000 for ads to be broadcast yesterday, today and Monday and Harris about $34,000 for the same period.

One new Barry ad reminds radio listeners that Barry, who has been trying to portray Harris as an outsider, was working in community activities and holding local offices here while Harris was serving in various national posts.

A new Harris televison ad asks viewers to recall her qualifications and compare them to Barry's. Then she is seen reminding viewers that "tomorrow you have a choice."

Jarvis continues running ads that she started on radio last week. Ray has had no ads in several months.

The candidates spent much of yesterday moving around the city in search of votes.

Barry, wearing a light-blue short-sleeved lace-front shirt, spent most of the afternoon in Ward 3 west of Rock Creek Park, first in Cleveland Park, and then at the Safeway store on Wisconsin Avenue in Georgetown, where he shook hands with voters while sitting in the "Barry Express," an old-fashioned, open-sided trolley car mounted on wheels.

Barry's mother, Mattie Cummings, and his son Christopher, 2, accompanied him along with several campaign workers.

Harris made a brief appearance at a celebrity barbecue fund-raiser for senior citizens programs that was held in Columbia Heights, and then left for a motorcade in Ward 7 east of the Anacostia River.

She then trekked across the city to a Safeway store on upper MacArthur Boulevard for a brief stop and a drive through the neighborhood. Wearing a bright red sweater, she stood in the back of a sports car and waved to passersby as the car drove through the streets.

Meanwhile, the campaign organizations were concentrating on getting last-minute mailings out to key voting groups, stepping up telephone bank operations, assigning supporters to polling places and readying preparations for cars and vans to ransport voters on election day.

Ray yesterday walked from the scene of one slaying in Southeast to the scene of another slaying in Northwest to draw attention to his support for a mandatory sentencing proposition, Initiative No. 9, which is also on the ballot.

Jarvis went to the city's parks and major shopping centers in her van yesterday, and mailed more than 150,000 letters asking for votes.

Last-minute strategies for the four campaigns do not differ greatly. In addition to relying on advertisements, the candidates and their aides are looking at the effects of a high or low voter turnout and estimating the number of votes that it will take to win the election.

Several strategists have said that about 40,000 votes are necessary to win the race. It is generally thought that a high turnout would benefit Barry by bringing out more elderly and young people, both groups shown by polls to be strongly behind the incumbent.

In the last several weeks, Harris' campaign has tried to get both Jarvis and Ray out of the race in the hope of facing Barry in a head-on contest, but both have vowed to stay in.

When the campaign began in January there were about eight candidates, in cluding four City Council members, challenging Barry for the nomination. Since the, at-large member Betty Ann Kane has dropped out of the race to run for reelection to her seat and John A. Wilson of Ward 2 also has abandoned his candidacy.

Barry, 46, a former member of the school board and City Council, has emphasized his record during his first-term as mayor, stressing his improvement of the summer jobs program and providing services to the elderly. Barry has also taken credit for straightening out the city's budget and billed himself as the only candidate with experience as a mayor.

Harris' campaign has stressed her record as an administrator. The 58-year-old former cabinet officer and lawyer has said the major issue in the race is which candidate can provide competent leadership for the city and she has attempted to present her records of accomplishments that include managing two hugh federal agencies.

Ray, a 39-year- old lawyer who has been on the City Council 3 1/2 years, has focused his campaign on the bureaucratic problems of the government, while Jarvis, a 40-year-old former research scientist serving her first term on the council, has stressed health care and a need for better city management.

Barry has been the leading fund-raiser since entering the race, collecting more than $1 million -- a record amount in the city -- and is also considered to have the best organization. All of the candidates were expected to attend church services this morning to make final appeals for voter support.

Questions about the validity of the city's list of 328,000 re gistered voters arose last week when D.C. Board of Elections and Ethics officials indicated that many thousands of the names probably were of people who no longer lived in the District or are deceased.

However, officials promised the City Council's Government Operations Committee there would be adequate safeguards against fraud and mix-ups at the polls. The board rejected a request by Harris to delay the election temporarily until the questions could be resolved.