For millions of children over generations, an introduction to the joys of reading has come courtesy of “Pat the Bunny,” the classic 1940 picture book by Dorothy Kunhardt that beckons young readers to join its two protagonists, Paul and Judy, in such sensory thrills as smelling flowers, looking in a mirror, feeling Daddy’s scratchy face and, naturally, stroking a bunny.

In an era before children’s books came outfitted with blinking lights, music makers and other attractions that mix the concepts of toy and book, “Pat the Bunny” — with its rabbit made from soft white fabric and sandpaper on the rugged father’s cheek — was a sensation. It reportedly became the second-best-selling children’s book in the United States, after Beatrix Potter’s “The Tale of Peter Rabbit,” and eight decades after its publication remains a staple of nursery bookshelves.

The 3-year-old girl who inspired “Pat the Bunny” was Kunhardt’s daughter and grew up to be Edith Kunhardt Davis, author of dozens of children’s books, including a set of sequels to her mother’s classic work. Ms. Davis died Jan. 2 at a hospital in New York City. She was 82 and had acute pneumonia and lung failure, said her daughter, Martha K. Davis.

Ms. Davis’s success, and the sweetness of the books that made her and her mother famous, at times belied her private struggles. Ms. Davis emerged as a children’s writer only after conquering alcoholism, which had afflicted her for years, including when she was pregnant with her son. Edward S. Davis Jr. — “Neddy” to her — suffered from heart ailments and died at 27 in 1990.

Ms. Davis chronicled his life and her grief, as well as her torment over the possibility that her drinking might have contributed to his infirmity, in the searing memoir “I’ll Love You Forever, Anyway” (1995). Another memoir, “My Mother, the Bunny, and Me” (2016), traced her life from childhood to motherhood and beyond, providing a nuanced portrait of the people behind one of the best-known works in children’s literature.

Edith Turner Kunhardt was born in New York City on Sept. 30, 1937, and grew up in Morristown, N.J. Her father, Philip B. Kunhardt, worked in textiles. Her mother was the daughter of Frederick Hill Meserve, a renowned collector of photographs and artifacts from the life of President Abraham Lincoln.

Lincolniana became a family devotion carried through five generations. Dorothy Kunhardt and her son, Philip B. Kunhardt Jr., wrote “Twenty Days” (1965), a noted photographic volume about Lincoln’s assassination and its aftermath. Among Ms. Davis’s children’s volumes was “Honest Abe” (1993), a picture book with artwork by Malcah Zeldis that traced Lincoln’s odyssey from a Kentucky log cabin to the presidency.

Dorothy Kunhardt began writing children’s books to help provide for her family during the Depression, when her husband was out of work. Her children recalled her as wildly creative, toiling in an unheated attic and ensconcing herself in a collection of secondhand books that became so voluminous it eventually blocked the sunlight from entering her bedroom windows.

“Part of me longed to have a mother like everyone else,” Ms. Davis told the New York Times in 1991. “And part of me was very proud of her.”

Ms. Davis was in elementary school when she made her first attempt at a book, the story of a hippo named Rosie who lived in New York’s Central Park Zoo. But she later recalled her humiliation when her mother penned her papers and other school work. As a senior in high school, she was caught giving a speech her mother had written.

“That moment was to haunt me for 30 years,” Ms. Davis wrote.

She attended the private Miss Porter’s School in Farmington, Conn., before receiving a bachelor’s degree in art history from Bryn Mawr College in Pennsylvania in 1959. The same year, she married Edward S. Davis, with whom she had her son and daughter. The couple divorced in 1971, and Martha Davis, of San Diego, is Ms. Davis’s only immediate survivor. (Ms. Davis’s mother died in 1979.)

Ms. Davis stopped drinking in 1973 on what her nephew Philip B. Kunhardt III described as a “watershed day” from which she proudly counted the following 46 years of her life. She became an editor with Golden Books, later telling the Los Angeles Times that she considered her mother the author and herself the editor until she tried her hand at writing and found success.

Ms. Davis wrote a shelf full of books — among them “The Mouse Family’s New Home” (1981) and “Martha’s House” (1982) — before an editor proposed that she write a sequel to “Pat the Bunny.”

“My first reaction was, ‘A spinoff of Pat the Bunny? No, no, never — don’t do it!’ ” Ms. Davis told Publishers Weekly. But in time, she warmed to the idea. “Pat the Cat” was published in 1984, followed by volumes including “Pat the Puppy” (1993) and “Pat the Christmas Bunny” (1999), as well as “Daddy’s Scratchy Face” and “Judy’s Flower Bed” (both 2005).

Instead of Paul and Judy, there were Martha and Neddy — named in honor of Ms. Davis’s children — who indulge in time-honored experiences such a smelling gingersnaps as well as more modern ones, such as withdrawing money from an ATM.

“How do mother and daughter compare?” Washington Post book critic Michael Dirda wrote in a review of “Pat the Cat.” “A survey . . . recently asked this question of a 5-month-old infant named Christopher and his somewhat older friends Mary, Katherine, Elizabeth, Joey, and Kerry. The results? An overwhelming consensus that Cat was fully the equal of Bunny in plot, character development, and gadgetry. . . . Clearly, the infant’s bookshelf now requires two Kunhardt titles.”

Ms. Davis’s other books for young readers included volumes exploring what it is like to be a farmer, a police officer, a firefighter and a veterinarian. She also wrote a history book, “Pompeii . . . Buried Alive!” (1987).

She told the New York Times that she shared the gift of her mother’s childlike sensibility but that “it never would have occurred to me that I could write.”

“In a sense, I was freed,” she said. “It was like a dam gave way.”

She found solace in writing after her son died, keeping a journal that evolved into her first memoir. It presented what New York Times reviewer Judith Viorst described as a “journey from raging desolation to something she once believed was unattainable: the ability to remember her dead child ‘with joy, or at least equanimity.’ ”

As Ms. Davis emerged from her grief, she made a painting of two rowboats — “side by side but not touching,” she observed, just like “Neddy and me.”