With her husband and songwriting partner, Barry Mann, she wrote lyrics for timeless hits by the Righteous Brothers, the Animals and Dolly Parton.Cynthia Weil, who with her writing partner and husband, Barry Mann, formed one of the most potent songwriting teams of the 1960s and beyond, churning out enduring hits like the Drifters’ “On Broadway” and the Righteous Brothers’ “You’ve Lost that Lovin’ Feelin’,” signature tunes of the baby boomer era, died on Thursday at her home in Beverly Hills, Calif. She was 82.Her death was confirmed on Friday by her daughter Jenn Mann, who did not specify a cause.“We lost the beautiful, brilliant lyricist Cynthia Weil Mann,” the chart-topping singer and songwriter Carole King wrote in a statement posted on social media.Recounting the friendship and rivalry that she and her former husband and songwriting partner, Gerry Goffin, shared with Ms. Weil and Mr. Mann (a friendship memorialized in Broadway’s “Beautiful: The Carole King Musical,” from 2014), Ms. King added, “The four of us were close, caring friends despite our fierce competition to write the next hit for an artist with a No. 1 song.”Ms. Weil and Mr. Mann, who were inducted into the Rock & Roll Hall of Fame in 2010, notched their first hit — “Bless You,” recorded by Tony Orlando — in 1961, two years after the music supposedly died with the Iowa air crash that claimed the lives of Buddy Holly, Ritchie Valens and J.P. Richardson, known as the Big Bopper.In fact, the pop and rock explosion of the 1960s was just beginning, thanks in no small part to key contributions from songwriters like themselves, Burt Bacharach, Neil Sedaka, Neil Diamond and Ms. King, who were part of the star-studded songwriting community centered on the Brill Building, the storied hit factory on Broadway and 49th Street in Manhattan.Ms. Weil and her husband toiled two blocks away, in fact, at 1650 Broadway. It was a humble setting in which to create musical masterpieces.“There were, like, three or four writing rooms there, and each room had an upright and an ashtray, because everybody smoked like crazy back then,” Mr. Mann said in a telephone interview on Friday. “Even though it was sparse, we worked and worked, and,” he added with considerable understatement, “some good things came out of there.”Ms. Weill with her husband and songwriting partner, Barry Mann, during the induction ceremony. Chad Batka for The New York TimesThose good things included two soaring, almost sepulchral No. 1 singles for the Righteous Brothers: “You’ve Lost that Lovin’ Feelin’,” from 1964, which in 1999 the music licensing agency BMI ranked as the most played song on radio and television of the 20th century, and “(You’re My) Soul and Inspiration,” from 1966.Another potential hit written for the Righteous Brothers, “We Gotta Get Out of this Place” (1965), ended up in the hands of Eric Burdon’s band, the Animals, who added some grit to it that helped it become an anthem for battle-weary soldiers in the Vietnam War. (“In this dirty old part of the city,” Ms. Weil’s lyrics began, “Where the sun refused to shine, people tell me there ain’t no use in tryin’).Whatever the style or genre, Ms. Weil supplied a trademark touch of poetry and wit. In her statement, Ms. King said her favorite Weil lyric is in the song “Just a Little Lovin’ (Early in the Mornin’),” recorded by Dusty Springfield in 1968: “Just a little lovin’ early in the mornin’ beats a cup of coffee for startin’ off the day.”While many of their songs became emblems of the 1960s, Ms. Weil’s lyrical success continued well after the mud of Woodstock had dried.In 1977, Dolly Parton hit No. 1 on the Billboard country chart and No. 3 on the pop chart with the Weill-Mann song “Here You Come Again.” (The song brought Ms. Parton a Grammy Award for best female country vocal performance.) In 1980, the Pointer Sisters hit No. 3 on the pop charts with “He’s So Shy,” which Ms. Weil wrote with Tony Snow.“There’s no reason a person shouldn’t write better 20 years after they start,” she said in an interview with The Los Angeles Times in 1986. “Writers know more and have more life experience to draw on.”Which is not to say that she found it easy to stay on top in the music business. “You kind of have to sit through the trends,” she continued. “Live through bubble gum and disco and everything else we’ve lived through. You’ve got to be a creative survivor.”Ms. Weil was born on Oct. 18, 1940, in New York City, the younger of two children of Morris Weil, who owned a furniture company, and Dorothy (Mendez) Weil.Growing up on the Upper West Side of Manhattan, and later on the Upper East Side, she trained as an actress and dancer and dreamed of a life in theater, a subject she later majored in at Sarah Lawrence College in Bronxville, N.Y.“I was always fixated on Broadway,” she said in a 2016 video interview with the Rock & Roll Hall of Fame. “I wanted to write for Broadway, I had always pictured myself doing something on Broadway.”She channeled those youthful longings into the lyrics for “On Broadway,” which she originally wrote from the point of view of a small-town girl dreaming of a future on the Great White Way — a dream that, the lyrics acknowledged, often comes with dashed hopes:They say the neon lights are bright on BroadwayThey say there’s always magic in the airBut when you’re walking down the streetAnd you ain’t had enough to eatThe glitter rubs right off and you’re nowhereMs. Weil eventually changed the song’s protagonist to a male for the Drifters’ version, which charted No. 9 as a single in 1962. Sixteen years later, George Benson lodged his own jazz-inflected version at No. 7.In addition to her husband and daughter, Dr. Mann, a psychologist, she is survived by two granddaughters.Despite her Broadway ambitions, Ms. Weil’s career took a different turn in 1960, when she met Mr. Mann, who had already co-written a couple of Top 40 hits, including one he recorded himself in 1961, the doo-wop sendup “Who Put the Bomp (In the Bomp Bomp Bomp),” which he wrote with Mr. Goffin.It was Ms. Weil who first noticed the man with whom she would craft a career and life. As her daughter recalled by phone, her mother had asked Don Kirshner, the Brill Building power broker music publisher, to find her a writing partner, hoping it would be Mr. Mann. She “thought he was really hot,” Dr. Mann said.Instead, Mr. Kirshner set up a meeting with a different up-and-coming songwriter. On the day of that meeting, Ms. Weil “was sitting and waiting,” Mr. Mann recalled, “and in walks Carole King. She thought, ‘Oh, what a drag, I don’t want to have to write with that chick.’”He added, “It worked out fine for both of them.” More