They came in floor-length sequined dresses and fabulous hats, tuxedos and African print robes, for a sprawling program of more than six hours of rousing gospel music, video tributes, booming sermons and round after round of standing ovations.

It was an all-encompassing tribute to a man who once seemed to be everywhere that politics and religion crossed paths in Washington.

At the civil rights demonstrations on the Mall and at the neighborhood disputes in Anacostia, the Rev. Willie Wilson was in the mix. At the church sermons and the council debates, the rallies and the organizing meetings and the memorial services, Wilson was at the microphone. He lent the weight of his endorsement to D.C. Council candidates for decades and once ran for mayor himself, winning more than 21 percent of the vote in a Democratic primary against incumbent Anthony Williams.

As Wilson, 75, prepares to retire after 46 years at the pulpit of Anacostia’s Union Temple Baptist Church, he enjoyed the adulation of more than 900 attendees at a sold-out retirement gala on Sunday night.

“For a lifetime, you have been shepherding the people of Washington, D.C.,” said Mayor Muriel E. Bowser, who brought her young daughter to the gala. “You have lived the belief that power concedes nothing without a demand.”

Wilson entered the event in regal fashion, sitting beside his wife, the Rev. Mary Wilson, on decoratively carved wooden thrones atop a platform that was wheeled in by a procession of men carrying golden staffs. At the head table, he joined his daughter, the Rev. Anika Wilson Brown, who will succeed him in April as the head pastor at Union Temple.

Speakers throughout the evening recounted Wilson’s history of activism, often dwelling on the times he provoked controversy. In 1986, Wilson accused the Chinese American owner of a carryout restaurant in Anacostia of racism against black customers, and led a three-month boycott of the shop that some viewed as rightful but others thought was unfairly harming a small business, or inflaming tensions between Asian and black communities in Washington.

In 1999, three white D.C. Council members questioned Wilson’s nomination to the board of the University of the District of Columbia, claiming the pastor was insensitive and divisive on issues of race. He was eventually approved, 11 to 2.

“If you know Christ, you’re on a cross — like my brother has been,” Louis Farrakhan said, referring to Wilson, his friend of more than 40 years, as a spiritual sibling. “He has not been loved by everyone. … He’s living by the word that he preaches.”

In a recent interview, Wilson said his proudest achievement was helping organize Farrakhan’s momentous 1995 Million Man March. (Farrakhan, the inflammatory civil rights leader, spent the largest portion of his lengthy speech on Sunday talking derisively about his own critics.)

Wilson said he could name only one regret — endorsing the mayoral candidacy of Anthony Williams. He eventually found Williams’s administration deeply disappointing and believed that he neglected constituents east of the Anacostia River, including by closing the District’s public hospital. Wilson was so fired up that he ran against Williams in 2002.

Wilson’s career entwined with that of Marion Barry, the larger-than-life mayor who defined D.C. politics for decades. When Barry was arrested for cocaine possession during his third term as mayor in 1990, Wilson invited the mayor and his wife to Union Temple and told the congregation to give them “the most tumultuous welcome ever in the history of the world.” The churchgoers contributed $3,573 to Barry’s legal defense fund that night.

Barry was sentenced to six months in federal prison. Upon his release, Wilson came to collect him from the Pennsylvania prison with six busloads full of supporters who escorted him home in style.

Wilson’s support for the man who would eventually become mayor again, then serve on the D.C. Council until his death in 2014, was not just political but pastoral. The minister officiated Barry’s 1994 wedding, kept vigil at his deathbed until 5 a.m., and presided over his hours-long memorial service.

Tributes on Sunday revealed influence that went far beyond politics. Surprise guest Lebo M, the musician whose voice famously opens “The Lion King,” described the welcome he found at Union Temple as a homeless African teenager. The movie musical he helped create is “not a Disney legacy, it’s a Union Temple legacy,” he said, belting out his famous “Naaaants ingonyama, bagithi Baba!” for the crowd. “That’s a Union Temple voice.”

The gospel musician Richard Smallwood, whose father was the founding pastor of Union Temple before Wilson took over the church six years later, told a similar story as he performed many of his greatest hits for delighted fans at the gala. He wrote “I Love the Lord” for Union Temple’s youth choir, he said, before Whitney Houston made it a hit by performing it in the movie “The Preacher’s Wife.”

Since Wilson began preaching, the city’s population has changed dramatically, growing whiter and wealthier. And with it, the black church’s influence has waned: Wilson points out that several churches that were once prominent have moved out of the city altogether, following their parishioners into the Maryland suburbs.

Union Temple itself has shrunk drastically due to gentrification. When Wilson arrived in 1973, the church had about 40 members; he managed to grow that flock to more than 7,500 at its peak in the late ’90s. Today, Wilson Brown estimates the membership at 1,500. And the pastors say the exodus to the suburbs of their members, who once walked to church from the Anacostia neighborhood, is to blame.

But Union Temple isn’t going anywhere: One of Wilson’s priorities was paying off the mortgage — an achievement so significant that Ayanna Gregory, the singer and daughter of comedian and civil rights activist Dick Gregory who wrote a song in Wilson’s honor for the party, included it in her lyrics: “Pastor Willie Wilson made sure that my Jesus looked like me,” she sang. “Self-determination! ... And they bought the church building; they paid it off!"

Wilson Brown said the church staff wave away every offer they’ve had to sell the property. “Somebody has to be in the city. Somebody has to do that work. We’re going to do that,” she said.

Days before his retirement party, Wilson sat in the empty pews at Union Temple, looking up at the painting of black heroes as the 12 disciples that he had commissioned for the huge front wall of the church. Marcus Garvey. Dorothy Height. Carter G. Woodson. Mary McLeod Bethune.

He worries that the black church today isn’t as vigorously involved in political activism as it once was. “Millennials believe in God and Jesus, but in fact, they don’t see the relevance of the church. That’s a real issue right now,” he said. He blames the appeal of the prosperity gospel, which has led throngs of churchgoers to focus on their own material success instead of social concerns.

But he is not worried for his own church.

“I’m feeling great,” he said. “I’m leaving behind someone I know will carry on the work.”

He said he has known for well over a decade that his daughter would succeed him. She started working at the church as an assistant pastor 10 years ago and became a full pastor three years ago. When she finished her PhD in counseling at Loyola University of Maryland last May, he knew it was time to hand her the reins.

In 1978, he said, he was kicked out of a local Baptist ministers’ group for ordaining a woman as a pastor. Now, he’s glad to see a woman as the lead pastor of a large black Baptist church in Washington. “This is a fitting conclusion.”

Wilson Brown, 44, says she intends to fill her father’s shoes as a political voice from the pulpit of Union Temple. “I don’t have to re-create that. I was born in the culture that my father, my mother, the leaders of the church speak out. ... That legacy, that history, that past allows me to continue to walk in that path.”

When she is installed in April, she will bring a new emphasis on mental health. Her dissertation research was on the impact that gentrification has on the well-being of displaced people. At church, she wants to address what she views as a neighborhood crisis of displacement: “There is no other place that we can facilitate the healing that is necessary. This is a traumatic event.”

Last month, she brought in a team of therapists to meet with members after the killing of Atatiana Jefferson, a 28-year-old woman shot in her own home by a Fort Worth police officer who has been charged with murder. “This is recurring trauma, incident after incident. We’re opening the doors to give people a place to come and vent.”

Union Temple, she says, will be a church “not afraid to direct you to therapy in addition to worship.”

Watching that session, Wilson says he was impressed, just as he was when he showed up to a meeting with plain paper handouts while Wilson Brown prepared a PowerPoint full of graphics. “She brought in a battery of fellow psychiatrists,” he said. “You can see now why it’s time for me to retire.”

While he’ll be retired from the church, he won’t cease his community activism, he said. He’s working on starting up a new anti-violence program for D.C. youth. He’ll keep following every action taken by the D.C. Council.

“I am a follower of Jesus — that is an unending job,” he said. Retirement will only “free me up to do more in the community.”