Marion Barry, whose strident black militancy was once frowned upon by many local church leaders, received endorsement for his campaign to be mayor of the District of Columbia yesterday from more than five dozen churchmen, including the pastors of some of the city's largest congregations.

Barry's unveiling of a list of 64 ministers backing his election appeared to put him ahead of Republican mayoral nominee Arthur A. Fletcher in the scramble to win the support of the politically influential church leaders, most of whom backed City Council Chairman Sterling Tucker and Mayor Walter E. Washington in last month's primary election.

But Barry's announcement left still unaccounted for some of the major church groups and ministers in the city, and suggested that he and Fletcher could still be battling during the three remaining weeks before the Nov. 7 general election for support from church leaders.

City politicians consider such endorsements vital because regular churchgoers - politically moderate, middle class black Democrats - are one of the most important and reliable group of voters in the city.

At yesterday's press conference, held at Metropolitan Baptist Church, 1225 R St. NW, the ministers appeared to push aside their past differences with Barry on such issues as legalized gambling, gay rights and softer penalties for marijuana use.

"My support for Marion Barry does not mean that I endorse such things as legalized gambling and the decriminalization of marijuana. I don't support that," said the Rev. John R. Wheeler, pastor of Vermont Avenue Baptist Church.

"But I do believe that beyond these things, he has many good things in his program. I believe you ought to keep some kind of contact with whoever's in the mayor's office," Wheeler said.

The Rev. M. G. Barr, pastor of New Southern Rock Baptist Church, said he found no faults with Barry's views on gambling or his militant past.

"Marion gets with the people. I've had two bus-loads of my people," Barr said. "Marion goes to the cabarets and my people go there, too.

"He may have been a radical down through the years. But even by being a radical, he helped some people. You can't beat that."

On Monday, Fletcher received the endorsement of about two dozen ministers, many of whom had supported Washington in the primary. They were led by the Rev. Andrew J. Allen, pastor of First Baptist Church of Deanwood, whose sister-in-law, Anita Allen, was defeated by Barry in the 1972 school board election.

Many of those churchmen who announced support for Barry yesterday endorsed Tucker in the primary. They included Wheeler, Bishop Smallwood E. Williams of Bible Way Church, the Rev. Henry C. Gregory III of Shiloh Baptist Church, the Rev. Leamon White of Mount Bethel Baptist Church, the Rev. John G. Satterwhite of the Center for Black Church Union and Barry's pastor, the Rev. David H. Eaton of All Souls Unitarian Church.

Others, like the Rev. Robert L. Pruitt of Metropolitan African Methodist Episcopal Church, the Rev. R. Clinton Washington of Jerusalem Baptist Church and the Rev. A. Knighton Stanley of Peoples Congregation Church, were for Washington.

Still others, including the Rev. H. Beecher Hicks Jr. of Metropolitan Baptist Church and the Rev. Herbert Travis of Salem Baptist Church, appeared to be neutral during the primary.

Barry told about two dozen ministers present at yesterday's press conference that if elected he would establish liaison between the mayor's office and the religious community and meet at least four times annually with city ministers.

"We will not always see eye-to-eye," Barry said, "but the mayor's office will always be open to you to discuss your concerns and to listen to your counsel."

The Committee of 100 Ministers, an interdenominational group, is the only clergy organization formally to announce its support in the mayor's race. On a close vote by about 20 members, it had endorsed Fletcher. But about 10 miniters present yesterday said they were members of the committee and were supporting Barry.

The Baptist Ministers Conference of Washington, D.C., headed by Allen's brother, the Rev. Willie B. Allen, has yet to endorse a candidate. The same is true of the interdenominational John F. Kennedy League for Universal justice and Goodwill.

The ministers conference supported Washington during the primary, while the JFK League endorsed Democrat John L. Ray, who later withdrew and supported Barry.