Somehow, the same geographic region that birthed sourdough bread, It’s-It and California cuisine can also lay claim to Soylent, a meal replacement almost universally scoffed at for its dystopian focus on efficiency over pleasure. It’s in this milieu of foodie contradictions that novelist Robin Sloan sets “Sourdough,” a flour-dusted hero’s journey into the Bay Area’s epicurean underworld, and a playful, odd tale about food as a sustainer of life in its many forms.

As in Sloan’s much-hailed debut novel, “Mr. Penumbra’s 24-Hour Bookstore,” “Sourdough’s” protagonist is an archetypal denizen of contemporary San Francisco navigating the secrets of a dreamily exaggerated city. Lois Clary, like many a Millennial freshly arrived in the Bay Area, starts working at a tech company called General Dexterity, which comes complete with a clubby name for employees (“the Dextrous”) and a lofty purpose.

But her life, monastic and monotonous, is really a sort of death: Her fellow Dextrous are “wraiths,” “bony and cold-eyed,” soulless husks of techie caricatures. Lois herself works 12 hours a day, then retreats to her minuscule apartment in the Richmond District (“for which I would pay rent that was fully four times my mortgage in Michigan.”) But most telling of Lois’ reduced state in this novel about food is that the only thing she subsists on is a “nutritive gel” called Slurry — which, like you-know-what, has its own unappetizing name and creepy devotees.

Revivification comes in the form of spicy vegetable concoctions and transcendental bread. Lois begins ordering takeout from Clement Street Soup and Sourdough, a restaurant run by two brothers descended from a mysterious European people called the Mazg. But after the brothers announce that they’re leaving, they hastily arrive at her door one day and entreat her to feed and care for their sourdough starter, dropping it off like a beloved but now-inconvenient pet. Most starters are composed of a roiling colony of bacteria and yeast; this one, Lois discovers, sings haunting melodies late at night, luminesces and, when baked, produces loaves inscribed with Edvard Munch-like faces.

As the starter is alive, so it gives life to Lois. After she begins baking with it, her days are transformed for the better. The result is a celebration of being physically present in the world, an antidote, Sloan seems to say, to the mediated, passive existence of interacting mostly with our screens. Lois builds an oven out of cinder blocks in her backyard by hand and gets fit from slinging dough (“My butt showed a heretofore unimagined definition.”) “When I fell into my bed, I was truly tired; not merely the brain-spent Well, I guess I’ll give up now tiredness of a day at the robot factory, but something deeper, actually muscular.”

Lois’ turnaround is satisfying to watch — who doesn’t want all their problems solved by the simple act of baking? — but it goes down a little too easy, more like artificially flavored candy than a loaf of whole wheat. “I needed a more interesting life,” Lois thinks to herself near the book’s beginning. Forty pages later, after she begins baking bread: “I had become interesting.”

But after Lois learns a thing or two about how to really live, Sloan’s story expands into something decidedly, and delightfully, weirder. Lois makes a pilgrimage to the Ferry Building to audition for Bay Area farmers’ markets, and everything takes on a mythical cast. Her judges “looked like a committee of harvest gods drawn from all the pantheons”; the results are announced “like a herald calling out a queen’s decrees.” The novel isn’t so much preoccupied with food as it is with stories about food, and it situates itself squarely in that tradition. Lois gets into a mysterious farmers’ market she calls “the underworld,” and she hesitates before trying some proffered honey there: “In every legend of the underworld, there is the same warning: Don’t eat the food.” The market’s entrance code is a reference to Hansel and Gretel (that fable about appetites), and one microbe enthusiast even says of his fermenting cultures, “This is their world, not ours, and their stories are greater.” These sustenance-related tales resonate throughout the story until food itself comes across as a sort of grand, delicious imprint of humanity.

What “Sourdough” isn’t concerned about are topical conflicts in food today — characters touch on the follies of industrialized food production, boutique organic farms and GMOs, but only briefly. (Though the story does take a dig at an Alice Waters stand-in, holding court at her intimate, wood-paneled restaurant in North Berkeley.)

Instead, whatever lessons we might draw from “Sourdough” are more personal, ambiguous and hard to extract: having humility, perhaps, or an open mind. And even then, the novel defies clear-cut analysis. It pushes us to do something simpler, to wonder at the weird beauty, set down in Sloan’s matter-of-fact prose, of life — or at least marvel at the strange sights and tastes of a familiar world embellished by a particularly inventive mind.