Gloria Shayne Baker, who composed the hit Christmas song “Do You Hear What I Hear?,” died on Thursday at her home in Stamford, Conn. She was 84.

The cause was cancer, her daughter, Gabrielle Regney, said.

Written in 1962 during the Cuban Missile Crisis, “Do You Hear What I Hear?” was intended to be a plea for peace. The song had music by Ms. Baker and lyrics by Noel Regney, to whom she was then married. (This division of labor was a switch for them: in most of their other collaborations, including “Rain, Rain, Go Away,” he wrote the music and she the lyrics.)

“Do You Hear What I Hear?,” which tells the story of the Nativity, has sold tens of millions of records. It has been recorded most famously by Bing Crosby, Perry Como, Robert Goulet, Johnny Mathis and the Harry Simeone Chorale; as well as by Pat Boone, Glen Campbell, Kenny G, Bob Hope, Whitney Houston, Mahalia Jackson, Jim Nabors, Kate Smith, John Tesh, the Tropical Flavor Steel Drum Band and the United States Air Force Symphony Orchestra, among hundreds of others.

Gloria Adele Shain was born in Brookline, Mass., on Sept. 4, 1923; she changed the spelling of her last name early in her career. She earned a bachelor’s degree from the Boston University School of Music and afterward worked as a pianist, arranger and background vocalist for composers like Irving Berlin and Stephen Sondheim. In later years, she accompanied the tenor Jan Peerce.