Barbara Cook, the Tony Award-winning soprano who in 1957 originated the career-making Broadway role of Marian the librarian in “The Music Man” and whose later concert and cabaret performances clinched her reputation as one of the world’s leading performers of theater songs, died Aug. 8 at her home in Manhattan. She was 89.

Her son, Adam LeGrant, said the cause was respiratory failure.

Cook’s life and career were marked by extremely sharp reversals. Early success as a pert blond Broadway ingenue were followed by years of near-unemployability as she battled weight issues and alcoholism. A professional life that seemed washed up for good turned around with a 1975 comeback concert at New York’s Carnegie Hall. That triumph ushered in decades of success as an exacting soprano and an unparalleled interpreter of complex lyrics.

Although Cook was never a film star and lacked the cultural penetration of stage entertainers such as Lena Horne, Mary Martin and Ethel Merman, she was revered among critics, peers and theatergoers for six decades. She combined an ebullient operatic technique and range with the emotional vulnerability and directness of a torch singer. She made an intimate connection between lyrics and audiences.

“No one sings theater songs with more feeling for the music or more understanding of the lyrics than Barbara,” Stephen Sondheim told The Washington Post in 2002. Cook increasingly became identified with the composer’s work; her swoony, commanding interpretations of “In Buddy’s Eyes” and “Losing My Mind” during a star-studded 1985 concert of “Follies” with the New York Philharmonic began an acclaimed exploration of Sondheim’s psychologically textured songbook.

Her early signature roles on Broadway came as the sweet-voiced ingenues in Meredith Willson’s “Music Man” and Sheldon Harnick and Jerry Bock’s “She Loves Me” (1963), but her vocal range was remarkable. One of her greatest successes was playing Cunégonde and introducing the acrobatic aria “Glitter and Be Gay” in Leonard Bernstein’s “Candide” (1956).

In her later solo shows, she took an almost confessional approach to theater performance. She noted elements of her biography — the triumphs and struggles — and often beguiled audiences by singing the final song without a microphone, intensifying the sense of intimacy in even the largest concert halls.

“I think I know how to act theater songs as well as anybody’s ever done it,” Cook said as she was named a Kennedy Center honoree in 2011, “and that’s something I didn’t understand in the beginning. It’s hard to judge your own work.”

Barbara Nell Cook was born in Atlanta on Oct. 25, 1927. Her father, a traveling salesman of ladies hats, was often away.

“I killed my sister when I was 3 years old,” Cook declared at the outset of her 2016 memoir, “Then & Now.” Cook’s mother blamed Barbara for passing on whooping cough to her 18-month-old baby sister, hastening her death. After her parents’ marriage collapsed when Cook was 6, her mother insisted she and Barbara share a bed well into the future singer’s teens, casting a smothering Southern Gothic sheen on an already tormented upbringing.

The one strain of joy throughout her early life was singing. As a child, Cook had sung to her father when he called in from the road. She never learned to read notes but displayed an innate sense of music anyway, from absorbing movies and spending Saturdays glued to radio broadcasts of the Metropolitan Opera. “I was also completely enthralled by the movies,” she told the New York Times, “and I wanted to be Jeanette MacDonald so badly.”

She was also shy, which came into conflict with the increasing demand for her singing at weddings and other social functions around Atlanta.

Her gifts were so apparent that a patron whose identity she never knew paid for vocal lessons — and trolley fare — when she was a schoolgirl. Following high school graduation in 1945, she spent three years working as a typist before moving to New York with the intent of conquering Broadway musical theater. It was, by her account, a terrifying ambition, but she felt called to it after being dazzled as an audience member watching the musical “Oklahoma!” on an earlier visit to Manhattan.

At one audition, the veteran songwriter Vernon Duke saw her potential and urged her to spend a summer performing at Camp Tamiment, a resort in the Pocono Mountains of Pennsylvania that was a training ground for generations of singers, actors, writers and comedy stars, including Danny Kaye, Woody Allen, Carol Burnett and Neil Simon.

The nightclub owner Max Gordon spotted Cook at the camp and booked her at the Blue Angel. He also urged her to study the frank style of Mabel Mercer, who along with Judy Garland became her most influential vocal role models.

“What I learned from Garland was how to structure a song so it had an emotional line with a beginning, a middle and an end,” Cook told the Times in 1987. “Mabel Mercer had such an intelligent, human approach to her work. She had the remarkable ability to put you in touch with your own experiences by bringing an ironic, adult humor to life’s calamities. In songs where other people emphasized the heartbreak, she would find humor. She also brilliantly broke the rules of singing by chewing on consonants, but in a way that made what she did seem to emanate from an idea or a feeling.”

The Blue Angel date opened the door for her Broadway debut, in a featured role in “Flahooley” (1951), with songs written by Sammy Fain and E.Y. “Yip” Harburg. Soon after, she wed actor David LeGrant, who later became a noted acting coach.

Cook played comic roles in Rodgers and Hammerstein revivals at City Center — Ado Annie in a 1953 staging of “Oklahoma!” and millworker Carrie Pipperidge the next season in “Carousel.”

She played an Amish girl in the 1955 Broadway musical “Plain and Fancy” and, in 1956, landed “Candide.” That adaptation of Voltaire’s novel blurred the lines between musicals and opera, nowhere more notably than in Cunégonde’s long and funny “Glitter and Be Gay.”

“It was four E-flats over high C,” Cook recalled in 2002. “There were six D-flats, 16 B-flats and 21 high C’s. Twenty-one high C’s. That’s what it was. And I did that eight times a week.” The ambitious but troubled show closed early, yet the cast recording, with Cook’s “Glitter” as a showstopper, became a cult favorite.

“The Music Man” paired Cook with Robert Preston as flimflam man Harold Hill. Playing the steady Marian the librarian, Cook sang the ballads “Goodnight, My Someone” and the duet with Preston “Till There Was You.” Cook and Preston both won Tony Awards, and Preston starred in the 1962 film; Cook screen-tested for the movie, but in a decision foreshadowing a decade of disappointment, the established film star Shirley Jones got the part.

“She Loves Me” was another original success, with Cook again earning praise from the Times as a sweet and feisty heroine. The romantic comedy closed after a respectable nine months but provided the singer with “Ice Cream,” one of the sweetest and most enduring songs in her repertoire.

Good roles grew scarce as Cook battled alcohol, depression and weight gain (reaching as much as 250 pounds) that she sometimes tried to address with diet pills. Alcohol was a major factor in the 1965 breakup of her marriage, as was Cook’s confession of a brief but serious affair with actor Arthur Hill. Her memoir candidly details paralyzing panic attacks that she was slow to connect to her heavy drinking.

At times she was so poor she stole food from the supermarket. By 1972, her 13-year-old son, Adam, went to live with his father. As she told the Times, “I was not some lady drunk. I was a real nonfunctioning alcoholic.”

Through the late 1960s and early 1970s, Cook continued recording and performing, but her career declined precipitously. “The Grass Harp” (1971), a theatrical bomb based on Truman Capote’s novel, would be her last Broadway musical for 39 years.

In 1973, Cook went on the road in a series of Gershwin concerts with Harold Lang, Helen Gallagher and Nancy Dussault. Among the shows’ admirers was the Julliard-trained pianist and arranger Wally Harper; in 1974 he and Cook forged a creative partnership that lasted until Harper — an alcoholic who never recovered — died in 2004.

Cook and Harper put together a cabaret act that caught the attention of concert promoter Herbert Breslin, Luciano Pavarotti’s manager. He arranged for their career-altering performance in Carnegie Hall and landed them a record deal as the concert became a “comeback” live album. “He took that first risk,” Cook later recalled to Opera News. “He really launched us.”

Cook stopped drinking in 1977 once she realized alcohol was a major source of the panic attacks that several times landed her in hospitals. High-profile appearances began to surge after she appeared at the White House in 1978 and, for the next 30 years, Cook’s reputation as a singer’s singer only grew.

In 2006 she became one of the rare solo performers to be presented as part of the Metropolitan Opera’s season; she marked her 80th birthday in a performance with the New York Philharmonic and her 85th at Carnegie Hall.

Her styles varied from the swinging, upbeat pop-jazz of the “It’s Better with a Band” live album in 1980 to her notably artful and remarkable interpretations of Sondheim. On Broadway, her solo act “Mostly Sondheim” (2002) — featuring songs by Sondheim and music that the composer said he wished he had written — was enthusiastically received by critics. She also starred in the revue “Sondheim on Sondheim” (2010).

By 2005, the Times labeled Cook “the Mother Earth of the American songbook,” and her master classes on how to interpret and perform theater songs were renowned from coast to coast. In 2007, the Kennedy Center created a cabaret series in Cook’s name to showcase Broadway talent; it lasted for nine years.

Her son, of Manhattan, is her only immediate survivor.

At 88, she planned yet another Broadway solo show for spring 2016 but canceled during rehearsals because of health concerns. That June she briefly returned to the stage, singing from a wheelchair to promote the release of her memoir.

Merging a faith in her talent with faith in herself became a mantra, one she often shared with students during master classes. As Cook wrote in her book, “You don’t need to look like anybody else. You don’t need to sound like anybody else. Have the courage to give us your true self. You are enough. You are always enough. We are always enough.”