Last month, a couple I’m friends with had their first child. She is small and red and cute. This fragrant, strange, round-eyed creature has sent me searching for the books I loved as a kid, even the half-remembered ones, so that I can buy them for her when she comes of age. I’ve done a lot of inelegant Googling in the past few weeks: “elephant roller skates baby brother” turned out to be a weirdly effective search. “Candied fruit wedding cake immigrants children’s book” was not.

The book that my younger sister and I read the most, though, isn’t one I’ll ever forget. Out of print, with only one library copy in circulation where I grew up, Wanda Gág’s “The Funny Thing” had, for my sister and me, an air of exotic pleasure. We’d check it out, renew it as many times as the library allowed, and then wait a month before requesting it again. My father finally took “The Funny Thing” to Kinko’s and had a spiral-bound version printed especially for us.

“The Funny Thing,” published in 1929, is, like Wanda Gág’s other books for children, fairy-tale familiar but also strange and unforgettably specific. It tells the story of “a good little man of the mountain” named Bobo, who lives in a cozy, well-appointed cave and spends all his time cooking customized, delicious-sounding meals for the local animals: nut cakes for the squirrels, seed puddings for the birds, cabbage salads for the rabbits, cherry-sized cheeses for the mice. One day, a haughty, evil-seeming, dragonlike entity named the Funny Thing—a self-described “aminal”—appears and requests a meal made of doll heads, his staple food. Bobo, aghast, refuses, and instead offers him what he feeds the other creatures.

The Funny Thing pooh-poohs it all. Bobo, pitying all the children who would be deprived of their dolls if he did what was asked of him, comes up with a solution. Mixing together a pantry of ingredients, Bobo rolls a motley dough into something he calls a “jum-jill.” He offers it to the Funny Thing, saying it’ll make his tail longer and the blue spikes on his back more beautiful. The Funny Thing, as vain as he is hungry, wriggles his tail “with a pleased motion,” looks down modestly, and rolls “foolishly” on the ground. He agrees to eat the jum-jill, finds it delectable, and smacks his lips with satisfaction. The personalized treat effectively gets the Funny Thing to quit eating doll heads, and the story ends with him sitting atop a mountain, spiky blue tail curling down “contentedly,” eating jum-jills that are delivered to him, one at a time, by a procession of small birds.

“The Funny Thing” is not unlike Gág’s other children’s books. “Millions of Cats,” the oldest American picture book still in print, is a macabre story of an old man with dangerous hoarding instincts and a mass of “millions and billions and trillions of cats” who eat each other until there is only one left. “Gone Is Gone” is a proto-feminist fable about a husband who doesn’t want to do any housework; the book’s climax involves the family cow hanging from the roof, choked by a rope, “her eyes bulging and her tongue hanging out.”

Needless to say, I found all this extremely appealing. Like most children, my taste was perverse; I gravitated toward impish protagonists who played mischievous tricks, threw fits, and caused general mayhem. I liked catastrophes, meanness, and terrible messes. “All successful children’s literature has a conspiratorial element,” John Updike wrote in 1976. It’s true: many, if not most, children’s books presuppose a common enemy in the form of the parent, the one who assigns chores and impinges upon fun. The narrator and the child reader are a united front against grownups. Unimaginative parents aren’t the source of conflict in Gág’s books, but I remember her selfish characters, vaguely morbid plots, and almost edibly appealing language lending the impression that to appreciate the books was to be part of a special cabal.

Though the sinister weirdness of her work seems out of step with contemporary children’s entertainment, which is often sanitized and moralistic, Gág’s stories are not without precedent. We all know that the original versions of fairy tales are stunningly gory, filled with self-mutilation, rape, and draconian retribution (a bride is dragged naked through the streets inside a barrel lined with nails; a queen is forced to dance in red-hot iron shoes; stepsisters get their eyes pecked out by birds). They were didactic texts meant to be read as cautionary tales.

“We make the assumption that anything violent and dark is necessarily inappropriate for children, but that’s what they often gravitate to,” Leonard Marcus, a historian of children’s literature, said. He included Gág’s work in a recent exhibition he curated at the New York Public Library. “But children have a self-censoring mechanism. They’ll either ignore or blank out items that are too much for them.”

It’s easy to imagine a Bavarian patriarch embellishing the most gruesome local crime stories as a means of getting his beloved daughters to heel closely and stay away from suspicious men. What’s harder to picture is a modern woman named Wanda thinking up stories about animal massacre and masochistic, cave-dwelling hermits. But Gág, as Marcus said, “came from a folklore tradition where that sort of dark storytelling was taken as a matter of course.”

Growing up, I never wondered about Wanda Gág; I just liked her books. But recently it occurred to me to be curious. Who was she? What kind of last name is that? Were my sister and I unusual in liking “The Funny Thing,” or did other kids like it, too?

There were, it turned out, answers. Wanda Gág kept a diary, which she published, in 1940, under the title “Growing Pains.” The story of her life appeals to me today in the same way her books did two decades ago. It reads like a fairy tale, with a wily heroine who lives amidst death and disease, and who handles fiascos with aplomb.

* * *

From “The Funny Thing.” From “The Funny Thing.” From “The Funny Thing.” From “Gone Is Gone.” From “Gone Is Gone.” From “Gone Is Gone.”

* * *

The oldest of five children, Wanda Hazel Gag (the accent was a later addition) was born in New Ulm, Minnesota, in 1893. It was a cold winter, and her parents—immigrants from Bohemia and Germany—were burdened not just with a newborn baby but also by a series of rented rooms, all of which were infested with bedbugs. Gág’s father, Anton, worked as a commercial photographer; her sickly, “birdlike” mother was his assistant.

Despite her destitute childhood—she shared a single sweater with her sister—Wanda wrote in a journal that it struck her, later in life, as “rather ‘story-bookish’ to be poor.” She was creative and resourceful and generally kept herself entertained. Wanda earned the nickname Inky because she was always drawing, and she was such an avid reader that a doctor, worried about her tired eyes, once consigned her to a dark room for an entire week.

In New Ulm, the Gag family lived in an immigrant enclave known as Goosetown, where older members of the community eagerly regaled the local children with folk tales, imported from Europe and embellished with time. In her diary, a young Wanda wrote that listening to such stories gave her “a tingling, anything-may-happen feeling … the sensation of being about to bite into a big juicy pear.”