I was about to cross the road in Taipei’s upscale Xinyi District when a pungent and rotten stench smacked me in the face. That’s how I knew I was getting close to Dai’s House of Stinky Tofu, one of the Taiwanese capital’s most popular and putrid-smelling restaurants.

For nearly 30 years, Wu Hsu Pi-ying, now in her 70s, has been running the family business at Dai’s, using a secret fermenting process passed down by her parents to create 10 varieties of stinky tofu, a beloved Taiwanese dish that’s full of live bacteria. Often referred to as the national snack food of Taiwan, stinky tofu gives off a putrid odour that’s so intense, it engulfs its surroundings in a foul-smelling funk that’s reminiscent of sour milk and rotting garbage. Love it or loathe it, these spiced and sliced fermented slabs pack a uniquely spoiled taste that’s all their own, and have come to symbolise Taiwanese street food.

You may also be interested in:
• The island that never gets full
• The dish that resembles engine oil
• The planet’s most extreme cuisine?

Inside the restaurant, I saw four Buddhist monks munching on cut slabs of the glistening green dish at one of the joint’s few tables. Framed calligraphy signs in Mandarin characters highlighted stinky tofu’s health benefits, while images of menu items tacked to the wall showed the eatery’s stinky star served deep-fried, steamed or in a spicy soup, with prices ranging from NT$20 to NT$100 (about 50p to £2.50).

Sensing my hesitation, a slight and softly spoken woman in a red jacket came out of the restaurant’s back fermentation room, where she was working alongside her son and daughter-in-law, and approached my table. “We have opened for 30 years,” she said, smiling. “No guest has ever thrown up [from eating my stinky tofu].”

No guest has ever thrown up

While slightly reassuring, I couldn’t help but think about American TV host Andrew Zimmern, who criss-crosses the globe to taste the world’s strangest and most disgusting dishes in his show Bizarre Foods. After stopping at Dai’s to order a cooked cow stomach hamburger in a fried stinky tofu bun, Zimmern spat the food into his napkin, saying, “I can’t do it… that is absolutely horrifying.”

I settled on the málà (spicy) stinky tofu soup, made with mushrooms, peppercorn and chillies, and slowly lifted a spoonful of the fetid, oily broth towards my mouth.

According to legend, stinky tofu was accidentally invented in China hundreds of years ago when a struggling tofu merchant opened his container of unsold goods after several days to discover that his bean curd and soy milk mixture had started to ferment. At some point, the merchant built up the courage to bite into the rancid, green-hued concoction and realised it was quite tasty. He quickly started selling the fermenting food, and the stinky snack became so popular that China’s Empress Dowager Cixi added it to the list of imperial foods served at her Qing Dynasty palace.

The dish arrived in Taiwan during the Chinese Civil War, when some two million people followed Nationalist leader Chiang Kai-shek in 1949 as he fled to the island after being defeated by Mao Zedong’s Communist government. According to Cathy Erway, author of The Food of Taiwan: Recipes from the Beautiful Island, stinky tofu now exists in various forms across Asia, but nowhere else is it more beloved than in Taiwan, where vendors deep-fry it, pickle it and enhance it with different flavours at small outdoor carts at the island's night markets.

“[In] trying to lure people to come to their stand, [they had] to come up with something really sensational,” Erway said. “It’s something that really stands out in the crowd.”

Today, stinky tofu is still primarily a street food throughout Taiwan, where it’s as synonymous with the country’s outdoor night markets as beef noodle soup. When I visited one of Taipei’s largest and most famous outdoor bazaars, the Shilin Night Market, I saw (and smelled) stalls serving the stuff barbecued, braised, steamed, skewered and fried into chips served with pickled vegetables. East of Taipei Zoo, Shenkeng Old Street is an entire boulevard dedicated to the dish, with hawkers selling it boxed, boiled in a spicy soup and even as a flavour of ice cream. While certain restaurants may serve stinky tofu with duck’s blood or as a side item, Dai’s is one of the few restaurants dedicated exclusively to the pungent dish, and it serves as the centrepiece for every menu item.

In recent years, Dai’s has become something of a mecca for stinky tofu lovers with discerning palates. In addition to the many griddled, skewered and spiced tofus found throughout Taipei’s night markets, Wu also serves a unique cold and raw variety of the versatile dish, topped with crispy seaweed-flavoured batter, spring onions and brown sauce. And for a dish where the smellier is the better, each of Wu’s menu items comes with an accompanying ‘stink score’, ranging from the hold-your-nose Sichuan-style soup (10) to the fried cuts served with pickled cabbage (12) to the cold and raw slabs that she and her family invented (13).

I would not like it if it is not stinky enough

Nothing, however, compares to the gag-inducing smell of Wu’s stinky tofu paste (15), a creamy, grey goo of tofu that’s been fermented for so long that it’s decomposed. The stuff is so potent that, instead of serving it to customers, Wu only sells the protein-rich paste as an ointment to help smooth and firm people’s skin.

“I really love eating stinky tofu since I was little,” said Wu, sitting across the table from me. “But also, I would not like it if it is not stinky enough.”

Growing up in Taipei, Wu remembers her parents making stinky tofu in their home and selling it on the street. An acclaimed martial artist, Wu left Taiwan to tour the world for many years as part of a kung fu performance troupe. She eventually returned to Taipei and used her family’s 60-year-old secret stinky tofu recipe to open Dai’s (named after her stepfather) in 1989.

Today, Dai’s is still very much a family business; Wu’s son and daughter-in-law help her prepare the dishes and serve guests, while Wu’s younger brother makes the pressed tofu. Yet, the undisputed brains and beating heart of the business is Wu, who maintains the family recipe and creates each batch of her specialty stink by hand.

Like all fermented food, stinky tofu takes time. Once Wu receives the pressed tofu slices from her brother, she dumps the slabs into a series of vats in the restaurant’s cramped back room, each filled with different consistencies of an all-natural vegetable and herb brine that’s been slowly fermenting at room temperature for two years. Like a sponge, the tofu slowly absorbs the dark-green mixture for up to two weeks. The longer the tofu sits, the more it absorbs – and the softer and smellier it becomes.

“I really think stinky tofu is an acquired taste. It grows on you over time, just like the bacteria that enhances the tofu’s flavour as it’s fermented,” said Mike Lee, co-founder of Taipei Eats food tours. “What’s unique is that the batter is just the bacteria that is developed through fermentation.”

Most stinky tofu aficionados maintain that if you can stomach the stench, the dish tastes far better than it smells – not unlike a sharp, fermented cheese. Though for Wu and many Taiwanese, the most important aspect of the dish is its many health benefits, which, according to Wu, include helping the digestive system and treating cold symptoms. But that’s not all: according to a number of recent studies, eating stinky tofu can also help prevent osteoporosis, lower the risk of prostate and breast cancer, and reduce cholesterol.

“People from every country come [here] to eat [stinky tofu],” Wu said. “But if they could find out the goodness of what is inside my tofu, [it] may get rid of their illness.”

Just then, Wu disappeared into her back fermentation room and emerged with a jar of the potent stinky tofu paste. Tiny bubbles rose to the top of the foamy, green concoction. Tilting it into a small saucer, Wu spooned the thick paste and told me that rubbing it on my skin would help smooth and soften it. She dipped a dollop of the mixture on my right index finger and instructed me to rub it on my left palm. Remarkably, the skin on my hand instantly felt firmer and smoother, but even after eight washes, the robust smell of concentrated stinky tofu lingered for more than seven hours afterwards.

It turned out that, despite its soy sauce base and piquant pepper flavouring, the málà stinky tofu soup I ordered was more smooth than spicy and smelled much worse than it tasted. The tofu actually helped bring out the freshness of the mushrooms and chilli, and the broth was surprisingly light, given the tofu’s rich thickness.

It grows on you over time, just like the bacteria that enhances the tofu’s flavour as it’s fermented

In fact, I liked it so much that I then went up three notches on the stink-o-meter and ordered the cold and raw stinky slabs. The raw stuff packed a punch, and I nearly gagged before biting into the moist, jelly-like pieces. Though, as with the stinky tofu soup, if you can stomach the stench enough to taste it, the raw tofu was actually quite pleasant and reminiscent of a ripe cream cheese.

Wu no longer works every day at the shrine to stink she built, and now entrusts her son with much of the restaurant’s day-to-day operations and her family’s secret recipe. Just as her parents passed down their technique to her, Wu hopes that her son will keep the family tradition alive.

I thanked Wu and walked out of Dai’s and back into the crisp, clean air of the Taipei night, lifting my hand to my nose to smell Taiwan’s stinky snack once more.

Culinary Roots is a series from BBC Travel connecting to the rare and local foods woven into a place’s heritage.

Join more than three million BBC Travel fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Culture, Capital and Travel, delivered to your inbox every Friday.