Two days after much of Moore, Okla., was flattened by a powerful tornado that killed 24 people, Obama pledged anew that the nation will assist with the town's recovery and rebuilding for as long as it takes.
"Eventually, life will go on and new memories will be made. New laughter will come. New songs will be sung," he said during a tribute concert for King in the East Room of the White House. "And that's often why we turn to music during trying times, for comfort and for inspiration, and sometimes just for a good diversion."
Calling her a "living legend," Obama presented King with this year's Gershwin Prize for Popular Song, an award given by the Library of Congress. She is the first woman so honored and joins a list of recipients that includes Paul McCartney, Stevie Wonder and Paul Simon.
"I'm honored to be recognized by the Library of Congress as the fifth recipient and first woman as has been stated," the 71-year-old King said. "I can't say it enough. I am so excited."
She accepted the honor on behalf of the co-writers who worked on some of her songs, a massive portfolio that includes such hits as "(You Make Me Feel Like) A Natural Woman" and "You've Got a Friend.
Several friends from King's decades in the music business came to the White House to perform in her honor, including Gloria Estefan, Billy Joel, Jesse McCartney, Emeli Sande, James Taylor and Trisha Yearwood.
King opened the show on the piano before taking a front-row seat between Obama and Vice President Joe Biden.
Estefan, Yearwood and Sande followed with King's "Will You Love Me Tomorrow," one of her No. 1 hits. She and Taylor put their voices together on "You've Got a Friend" to close the concert.
King also sang "I Believe in Loving You," co-written with Hal David. She told The Associated Press in a recent interview that her plan is to release the song as a single to honor David, a Gershwin Prize recipient who died last year.
"I'm hoping that this will become a song that people will want to play at their weddings," she said. "It's so romantic. Hal is such a great writer, and his words live on forever."
In the interview, King said it was a tremendous honor to be recognized with a place in history she never would have expected, and to have it happen at a venue as historic as the White House.
"It is yet another of the many important messages to young women that women matter, women make a difference," King said. "That popular music is recognized by the Library of Congress as being worthy of a place in history is especially significant to me."
As her memoir, "A Natural Woman," began to sell last year, King hinted that she would like to retire. But she since has gone on tour in Australia and plans to sing at a benefit concert for Boston Marathon bombing victims.
She now says she's too busy to retire.
"I still feel that it would be lovely to retire, but that time is not yet here apparently," King said.
King got her start in music growing up in Brooklyn, N.Y., and wrote her first No. 1 hit at age 17— "Will You Love Me Tomorrow" for the Shirelles—with then-husband Gerry Goffin.
Her breakout 1971 album "Tapestry" remains one of the best-selling records of all time. It is the first female solo album to reach Diamond status, surpassing 10 million copies sold. The album included No. 1s "It's Too Late" and "I Feel the Earth Move," as well as "You've Got a Friend" recorded by Taylor.
It was the first album by a female artist to win all the top Grammy awards—for record, song and album of the year, along with the Grammy for best pop vocal performance.
"And as one of the best-selling albums of all-time, it cemented Carole's status as one of the most influential singer-songwriters that America has ever seen," Obama said.
More than 1,000 artists have recorded hundreds of King's songs, including The Beatles, Mary J. Blige, Cher, Phil Collins, Aretha Franklin, Barbra Streisand and many others.
In 1990, she and ex-husband Goffin were inducted into the Rock and Roll Hall of Fame.
Wednesday's tribute is the latest in the "In Performance at the White House" series under Obama. It will televised nationally by PBS stations on May 28.
Associated Press writer Brett Zongker contributed to this report.
Gershwin Prize for Popular Song: http://www.loc.gov/about/awardshonors/gershwin/
Follow Darlene Superville on Twitter: http://www.twitter.com/dsupervilleap