One fine day in 1957, a 15-year-old named Carol Klein got off the express train from Brooklyn to Manhattan with schoolbooks under one arm and sheet music under the other. She wore bobby socks, white sneakers and a black skirt with a pink poodle embroidered on it.

Starting with the “A”s in the phone book, she began visiting music industry executives, hoping that her aggressive piano playing and perfect pitch would land a contract. At Atlantic Records, impresario Ahmet Ertegun called her “soulful” but sent her on her way. ABC-Paramount invited her to record four of her songs, including a thankfully forgotten number titled “Baby Sittin’ ” (“You know the baby I mean — he’s 17”) .

Klein, eventually known as Carole King, wrote in her recent memoir, “I shudder to recall . . .”

The bright side was that her work could only get better. And by any measure, it has.

After a career spanning five decades, more than 20 solo albums and numerous high-profile honors, the 71-year-old King is the first woman to receive the Library of Congress’s Gershwin Prize for Popular Song. The award, established in 2007 to celebrate the music-writing team of George and Ira Gershwin, will be presented at the White House on Wednesday, after a Tuesday concert in her honor at the Library of Congress. Previous winners include Paul Simon, Stevie Wonder, Paul McCartney and the team of Burt Bacharach and Hal David.

In a rare and brief phone interview last week as she wandered around Manhattan’s Upper West Side, King was friendly but not rock-star boastful. She stopped in front of Carnegie Hall, where she gave two sold-out concerts in 1971. She did not linger on that point but instead uttered the old joke of how to get there: “Practice, practice, practice.”

For someone who has spent a lifetime expressing herself in music, she is not overeager to describe the process of writing.

Of lyricist Gerry Goffin, her first husband and early musical partner, she says: “He taught me a lot about the mood of a song, how to set the mood with chords and melody, that major chords can sound very majestic. He didn’t say that. He’d say, ‘I like that one.’ ”

So did millions of record buyers. The pair had a prolific and commercially successful run of pop songwriting — bookended by “Will You Love Me Tomorrow?” for the Shirelles in 1960 and “(You Make Me Feel Like) A Natural Woman” for Aretha Franklin in 1967.

King transitioned to performer in a way many “hired gun” songwriters of that era did not. Her breakthrough was the Grammy Award-winning 1971 soft-rock album “Tapestry,” which sold more than 13 million records, clung to the Billboard charts for 302 weeks and helped set the template for the singer-songwriter genre of deeply personal stories set to music.

Songs on the LP included “I Feel the Earth Move,” notable for its rollicking sexuality, the up-tempo tale of relationship rot, “It’s Too Late,” and the reassuring ballad “You’ve Got a Friend,” which provided the only No. 1 hit for her friend James Taylor.

At the peak of her selling power, King left Los Angeles for the backcountry roads of Idaho in 1977. Moving off the grid aligned with the “hippie queen” image she conveyed from photographs of the era showing her with cascades of curly hair, often beside horses or Indian-print drapery.

Whenever she performs, she continues to draw devoted baby-boomer audiences. “They have connected with me and, in connecting with me, they’re really connecting with themselves and thinking of where they were when they first heard one of my songs,” she said.

King becomes more animated talking about her political and environmental activism. With limited success, she has advocated for the preservation of 23 million acres of wilderness in the Northern Rockies. She has performed at fundraising events for Democratic presidential candidates. She also traveled to Havana in 2002 as part of a congressional delegation that hoped to ease U.S. trade restrictions with Cuba, and she serenaded Fidel Castro with “You’ve Got a Friend.”

In Boston this month, she received an honorary doctorate from the Berklee College of Music, along with country star and marijuana advocate Willie Nelson and singer Annie Lennox of the Eurythmics. “It’s pretty amazing,” King said. “I’m now Dr. King. Annie Lennox gave a whole speech, and Willie just asked if he could now write his own prescriptions. I said, ‘I have a dream. . . . ’ ”

“My mother would be so happy,” she added. “She finally has a Jewish doctor in the family.”

King, a fireman’s daughter, was 4 when she began playing piano and mimicking tunes from the hit parade. She once told an interviewer that she “would listen to the radio and tear every song apart and try to figure out why it was what it was, even if it wasn’t a hit.”

She met Goffin at Queens College in the late 1950s but dropped out when she became pregnant. A childhood friend, songwriter Neil Sedaka, smoothed her introduction to Don Kirshner, whose music publishing company in Manhattan operated under a churn-it-out impulse aimed at separating teenagers from their money.

For Kirshner, Goffin and King wrote their seminal hits of the early 1960s, including “Will You Love Me Tomorrow?” which expresses with startling frankness a woman’s fears of the day after sexual intimacy. King and Goffin’s later compositions included “Up on the Roof” for the Drifters, “One Fine Day” for the Chiffons, “Pleasant Valley Sunday” for the Monkees and “Don’t Bring Me Down” for the Animals.

The King-Goffin marriage dissolved amid her husband’s drug use and infidelity, and King moved in the late 1960s to Laurel Canyon, a bohemian neighborhood of Los Angeles. She became a backup musician for James Taylor, and he gently nudged her into a solo career that culminated in “Tapestry.”

The album’s production was subtle and clean, with a sharp narrative focus on friendship and loss. “Doesn’t anybody stay in one place anymore?” she asked in “So Far Away,” one of the many songs she wrote solo.

Anthony DeCurtis, a rock music critic and author, said King was “really important for millions of people and very specifically for millions of women. When she wrote about sexuality in ‘I Feel the Earth Move,’ there’s a playfulness in the song and a willingness to explore something that not a lot of women songwriters, outside of say the blues, had really explored. That made a big impact.”

“Tapestry” — No. 36 on Rolling Stone magazine’s list of the 500 greatest albums of all time — was a near-impossible act to follow commercially and critically. Furthermore, King had grown weary of what she called the “fast lane” in Los Angeles and parties where conversations revolved around plastic surgery and gossip.

Idaho, she wrote, appealed to a desire for bucolic tranquility. King now lives on a 128-acre ranch that has a professional recording studio and two swimming pools heated by geothermal hot springs. She said she hasn’t focused on songwriting in years. Her musical legacy seems assured anyway.

King and Goffin were inducted into the Rock and Roll Hall of Fame in 1990, and King is now the subject of a musical biography scheduled to reach Broadway next spring. She has shown a belated willingness to hold ajar the door to her personal life. Last year in her memoir, “A Natural Woman,” she revealed the physical abuse she suffered in her third marriage, to a leathersmith and aspiring musician named Rick Evers.

“I got old enough to have enough of a history to write about,” she said. “I like to bring to people the notion that if you follow your path, it may take you down a wrong path and you can get off and do something different. But you don’t have to be fearful of making a decision. In my life I’ve made decisions that are not so good, but if you’re feeling like leaping, leap.”

“Carole King: The Library of Congress Gershwin Prize in Performance at the White House” premieres May 28 at 8 p.m. on PBS.