ATLANTA — As the nation paid tribute to the Rev. Dr. Martin Luther King Jr., some of his relatives sharply criticized President Trump on Monday over his outlook on race and its effect on the country nearly half a century after Dr. King’s death.

“Our collective voice in this hour must always be louder than the voice of one who may speak sometimes representing these United States, whose words sometimes do not reflect that legacy of my father,” the Rev. Bernice King, Dr. King’s youngest child, said at Ebenezer Baptist Church in Atlanta.

Addressing the congregation where her father was a co-pastor between 1960 and 1968, Ms. King added, “We cannot allow the nations of the world to embrace the words that come from our president as a reflection of the true spirit of America.”

Ms. King’s remarks, during a crowded, upbeat event in Dr. King’s honor, came days after Mr. Trump was accused in a meeting about immigration of using crude words to describe Haiti and African countries and of suggesting that the United States should admit more people from places like Norway.

Mr. Trump, speaking to reporters on Sunday night in Florida, denied making any inflammatory remarks and flatly declared: “I’m not a racist. I am the least racist person that you have ever interviewed, that I can tell you.”

Martin Luther King III standing in front of the Martin Luther King Jr. Memorial in Washington on Monday for a ceremony honoring the life and legacy of his father.CreditPablo Martinez Monsivais/Associated Press

On Monday, the Rev. Dr. Raphael G. Warnock, Ebenezer’s senior pastor, spoke of “a volcanic eruption of hate speech spewing” from the president. “Mr. Trump, you need to repent,” he said.

In Washington, Martin Luther King III, a son of Dr. King, noted Mr. Trump’s remarks and said, “I don’t even think we need to spend any time even talking about what it says and what it is.”

“Now the problem is that you have a president who says things but has the power to execute and create racism,” Mr. King said. “That’s a dangerous power and a dangerous position, and we cannot tolerate that. We’ve got to find a way to work on this man’s heart.”

While two of Dr. King’s adult children spoke out against the president on Monday, another relative, in an interview on Fox News on Saturday, defended Mr. Trump. “President Trump is not a racist,” Alveda C. King, a niece of Dr. King and a former Georgia state legislator, told “Fox and Friends.”

In brief remarks at Ebenezer, Mr. Trump’s housing and urban development secretary, Ben Carson, suggested that he had concerns about some of the remarks attributed to the president.

“I’m a member of this administration, and I don’t agree with the president about everything or of how it’s said,” said Mr. Carson, who noted, to some laughter, that he did not “even agree with everything that I’ve said.”

The Rev. Bernice King, daughter of the Rev. Martin Luther King Jr., speaking during a commemorative service at Ebenezer Baptist Church in Atlanta on Monday.CreditPhil Skinner/Atlanta Journal-Constitution, via Associated Press

“There is something to be said about understanding messaging,” Mr. Carson said, “and if the way you say things is so inflammatory that people can’t hear your message, it’s not helpful, and that’s why I don’t do that anymore.”

Despite the partisan firestorm that has resulted from Mr. Trump’s remarks, elected officials in both parties publicly celebrated Dr. King’s work in Georgia, his birthplace and the site of his marble-encased tomb along Auburn Avenue in Atlanta. Representative John Lewis, Democrat of Georgia, wrote on Twitter that “Dr. King’s legacy is a guiding light.”

Senator Johnny Isakson, Republican of Georgia, said it was a day to “honor and remember the leadership and wisdom of Dr. Martin Luther King Jr., whose legacy continues to make a positive difference in the lives of many people in our state and around the world.”

During a visit to Georgia last week, Mr. Trump approved legislation that upgraded the designation of National Park Service sites that honor Dr. King in Atlanta. And on Friday, he signed a proclamation marking the holiday on Monday and encouraged “all Americans to observe this day with acts of civic work and community service in honor of Dr. King’s extraordinary life.”

The White House on Monday tweeted a video message from Mr. Trump in which he says that Dr. King’s dream is “the promise stitched into the fabric of our nation, etched into the hearts of our people and written into the soul of humankind.”

Mr. Trump spent part of the holiday in Florida at the Trump International Golf Club, but White House officials did not confirm whether he played golf.

Michael D. Shear contributed reporting from Palm Beach, Fla.