One chilly spring afternoon around a decade ago, my wife Angeles and I were walking along Hiroshima’s Tenma River, looking for a place to eat. Famished and frozen after a day’s sightseeing, we fantasized about something hot, tasty and filling that wouldn’t bankrupt us. We’d only been in Japan a few days, so eating out was still a daily trip down a rabbit hole into a culinary wonderland.

We spotted a dark-blue noren curtain hanging outside a small shop, a sign that it was open, and ducked in. Inside the tiny space were just half a dozen little tables and four empty barstools. The owner, a large cheery-faced woman, cried “irashaimasen” (welcome) and beckoned us to sit at the “bar” – a large rectangular hotplate.

Our Japanese was still rudimentary, so we just said “hai” (yes) and “onegaishimasu” (please, or thank you) to everything she said, and hoped for the best. She doled out two ladlefuls of batter onto the hotplate, and spread them out into two big circles, side by side. She then put a Fuji-sized mountain of cabbage on top, followed by a good handful of bean sprouts and some thin rashers of pork. Next, while the vegetables steamed away, she placed two great tangles of ramen noodles alongside.

After a few minutes, she deftly flipped the pancakes over, placing each one on top of a pile of noodles. It was culinary performance art; an edible sculpture taking shape before our eyes.

It looked and smelled delicious. But she hadn’t finished yet. Cracking two eggs onto the grill, she spread each one out into a circle the same size as the pancake. Finally, she placed the pancake on top of the egg, then decorated the entire mound with a generous sprinkling of chopped green onions, dried bonito flakes and nori seaweed. Handing us a couple of bottles of sauce – one mayonnaise and the other a heavenly smelling brown sauce – she gestured us to dig in with a hearty “itadakimasu!” (bon appetit).

We drizzled the sauces on top, and ate directly off the hotplate, using a metal spatula. And, just as we’d fantasized, it was hot, delicious, filling and cheap.

That was our first experience of Hiroshima’s legendary okonomiyaki, an experience that we repeated many times over the following years as Hiroshima became our permanent home. It’s been called “the Japanese pizza” or “the Japanese pancake”, but such comparisons fail to conjure the wonder of the okonomiyaki experience. London has jellied eels. Valencia has paella. New Orleans has gumbo. And Hiroshima has okonomiyaki – a signature dish that defines the identity of the city.

You may also be interested in:

• How Hiroshima rose from the ashes

• Is this Japan's best breakfast?

• The surprising truth about Indian food

Okonomiyaki is popular all over Japan, particularly in the Kansai region, which includes Osaka, Kyoto and Kobe, and in Hiroshima, some 300km down the Inland Sea coast from Osaka. But the Hiroshima region holds a distinctive claim to fame: it has more okonomiyaki restaurants per capita than any other region in the country; and there are more than 2,000 of them in Hiroshima city alone. Okonomimura (literally Okonomi Village), in the heart of downtown Hiroshima, is a four-floor labyrinth of more than 25 okonomiyaki restaurants, each with its own variations.

These variations are key to the dish’s popularity. Don’t like pork? Then try it with locally caught oysters. Prefer a vegetarian option? Order one with soy meat. Over on Miyajima Island, just a 10-minute ferry ride across Hiroshima Bay, some places, like the seafront Yosakoi restaurant, serve anagoyaki: okonomiyaki with slices of anago (conger eel), an island specialty.

This “whatever you like” approach also makes okonomiyaki an ideal dish to prepare at home, using whatever you have handy or leftovers from your fridge. One evening when a friend invited us to her house for an okonomiyaki dinner, her father brought over two freshly caught squid, so they became the main ingredient.

This media cannot be played on your device.

A friendly rivalry exists between Kansai and Hiroshima as to which area makes the best okonomiyaki. Both styles taste fabulous. The main difference is that the Kansai style mixes all the ingredients together, while Hiroshima prefers a layered style. Moreover, the Kansai version doesn’t use noodles. That’s why we’ve heard more than one Hiroshima resident comment that the Kansai version “is just a snack”.

Regional preferences apart, Hiroshima’s citizens have another reason to be proud of their local dish: it’s the food that fuelled the city’s post-A-bomb renaissance.

It’s literally soul food for Hiroshima people

An early prototype of Hiroshima’s okonomiyaki first appeared in the pre-World War Two period. Known as “issen yōshoku” (literally: “one-coin Western food”, or “Western food for a penny”), it was simply a thin pancake topped with green onions and dried fish flakes or shrimp, but it proved particularly popular among children.

On 6 August 1945, an atomic bomb was dropped on Hiroshima, instantly turning the city into a charred wasteland. In the aftermath of this horror, the survivors – facing acute food shortages – had to make do with whatever food they could find. Some inventive souls salvaged iron plates from the rubble and used them as makeshift hotplates on which to cook issen yōshoku, their favourite pre-war treat, using flour and whatever else they could get their hands on.

As the city’s reconstruction gathered momentum, food stalls and other cheap eateries sprang up around town, selling issen yoshoku. Many of these street stalls were concentrated in the downtown Shintenchi area, where the Okonomimura complex now stands. They began adding whatever ingredients were available – such as cabbage, eggs, ramen or soba noodles and locally caught seafood – to make issen yoshoku a more substantial dish that could sustain the local people as they rebuilt their lives, and their city.

This new pick-and-mix approach to the ingredients is how the dish earned its more appropriate name: okonomiyaki, which means “whatever you like, grilled”. By the late 1950s, it had become popular among all social classes and age groups, a cherished symbol of the local people’s resilience and vitality.

According to Shizuka Kobara, public relations officer at Otafuku, the leading Hiroshima-based manufacturer of that sweet-smelling okonomiyaki sauce, “Hiroshima developed side-by-side with okonomiyaki; it took root in the citizens and became their favourite food since then. It’s literally soul food for Hiroshima people.”

If you’ve ever been to Hiroshima, you’ll have smelled okonomiyaki, even if you didn’t try it. You can scarcely walk more than a block without being greeted by the warm, welcoming aroma pouring out of doorways and windows, permeating the air with its happy sweetness. Just a whiff is enough to banish the blues. Our friend Yasuko even takes bottles of okonomiyaki sauce – which is a little like Worcestershire sauce, but sweeter and less salty – with her when she travels, to stave off homesickness.

So, what goes into this magical potion? According to Kobara, “many fruits and vegetables, including tomato, dates, onions and apples, with more than 20 kinds of spices and peppers.”

Nowadays, with so many restaurants competing for trade, the okonomiyaki scene in Hiroshima is constantly evolving as owners come up with new ways to attract customers and make okonomiyaki more accessible to foreign visitors. In 2008, Otafuku opened the Wood Egg Okonomiyaki Museum where visitors can tour their factory and museum, and learn to cook okonomiyaki. They followed up in 2018 with the Okosta Okonomi Experience cooking studio next to Hiroshima station.

With the slogan “Borderless Happiness”, Okosta welcomes people of all nationalities and cultures who want to learn to make their own okonomiyaki. Vegetarian and halal versions are among the options. In its first year, 200,000 people visited the studio, 20% of whom were from overseas.

Otafuku’s aim is to “contribute to a joyous society with health, wellness and happiness through food,” Kobara said.

Our favourite okonomiyaki spot is the Tokugawa restaurant in Hiroshima’s Hesaka district. It’s worth visiting for the building alone – an historical wooden house with a sweeping black-tiled roof, dating back more than 140 years to the early Meiji Era (1868-1912). As you step past the small garden and slide back the door, you find yourself in a shadowy hall of exposed rafters and tatami-floored booths. It’s like you’ve stepped into a past century.

The waiter brings the ingredients, switches on the hotplate, which is also your table, and then leaves you to prepare your own okonomiyaki. If you get confused, just press the button and the ever-patient staff will come to your rescue. If you don’t fancy eating directly from the hotplate with the spatula, ask for chopsticks and a plate, or even a knife and fork. Whichever you choose, cooking has never been such a fun challenge. It’s also a highly sociable way to eat, “gathered around the hotplate chatting happily as you cook and eat,” as Kobara put it.

With okonomiyaki restaurants springing up everywhere from Barcelona to Brisbane, Hiroshima’s iconic dish looks set to join sushi, tofu and ramen as another beloved Japanese culinary export.

So, when you come to Hiroshima, be sure to try a real okonomiyaki – with whatever ingredients you fancy – and treat your heart to some Hiroshima-style happiness. And remember, you’re not just having a meal. You’re also savouring the soul of the city.

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 "The Essential List". A handpicked selection of stories from BBC Future, Culture, Worklife and Travel, delivered to your inbox every Friday.