Brussels sprouts, Marmite, stinky cheese … these are all foods guaranteed to create divisions around the dinner table –and sometimes extreme reactions. A friend once ordered a baked camembert at dinner and I had to physically remove myself from the vicinity, such was its overpowering stench.

Yet foods that once turned my stomach – mushrooms and prawns, in particular – now make a regular appearance on my plate. How is it that my opinion of a juicy grilled mushroom has gone from yuk to yum after 30 years of steadfast objection? And why is it that certain foods leave some diners gagging theatrically while others tuck in with vigour?

Taste is a complicated business. In evolutionary terms we’re programmed to prefer sweeter flavours to bitter tastes: sweet ripe fruits provide a good source of nutrients and energy, for example, while bitter flavours can be found in dangerous plant toxins, which we’re better off avoiding. We’re also more likely to go for fatty foods with a high calorie count which would provide the energy needed for hunting our next meal. But now we live in a world where bitter vegetables such as kale reign supreme, kids salivate over eye-wateringly sour sweets and hunting dinner is as strenuous as picking up the phone.

There are some environmental factors at play. When you eat something, molecules in the food hit your taste cells in such a way as to send a message to your brain causing one of five sensations: sweetness, saltiness, bitterness, sourness or umami (a loanword from Japanese meaning ‘pleasant savoury taste’). Mix up these taste cells and messages with external influences and the results can be dramatic. You know the grim taste of drinking orange juice after brushing your teeth? That’s down to a detergent in toothpaste called sodium lauryl sulphate (SLS) interfering with your taste cells, reducing your ability to taste sweetness and adding a bitter tang to the juice’s acidity.

Then there’s artichoke. You can chow down on this quite happily until you come to clear your palate with a swig of water, when you might notice a strange sweet taste. This is because of a substance in the vegetable called cynarin which quietly latches on to your sweet receptors without activating them. When you have a drink, the molecules are washed away, releasing the receptors and triggering a phantom sensation of sweetness.

Some 25% of the global population can be classed as ‘supertasters’, which basically means they experience flavours more strongly than others. This explains why some people have such a serious aversion to coriander. Coriander leaves are made up of around 40 different organic compounds, 82% of which are aldehydes, which are largely responsible for the plant’s flavour. But these aldehydes are also commonly found in soaps and lotions, so for some – supertasters in particular – coriander can taste like washing up liquid. Some of coriander’s aldehydes are also found in the compounds excreted by stink bugs. Yum.

But while supertasters may well be picky eaters, picky eaters are not necessarily supertasters, so our flavour preferences go beyond genetic and environmental factors. In fact, they’re mostly learned, and this starts before we’re even born.

Multiple studies in the US have shown that foetuses learn about odours from their pregnant mother’s diet, with research indicating that newborns prenatally exposed to garlic in amniotic fluid had a less negative reaction to the smell a few days after they were born, compared with babies whose mothers had gone easy on the spice. Similarly, babies whose mothers had eaten a lot of carrots while pregnant appeared to enjoy carrot-flavoured cereal – apparently such a thing exists – more than plain cereal in their early months.

After birth, our food preferences take shape for up to two years, and during that time we’ll eat pretty much anything, but then we become neophobic: new food becomes a big no-no. So if you’ve not tried something before you hit the terrible twos, the chances are you won’t much care for it when you try it later on. It’s no surprise, then, that ensuing tantrums mean most parents give up trying to feed their children particular foods – and it’s usually these that they end up hating for the rest of their lives.

Expectation is also important. We’re likely to be averse to foods that don’t taste the way they look or smell (freshly-brewed coffee is a good example of this), or offer up unfamiliar or strange qualities which we then interpret as a personal dislike. The texture of mushrooms is an oft-cited example.

Then perception bias enters the equation. No matter how open-minded we like to think we are, most of the time we’ve already decided whether we like something or not before we’ve even tried it. This has been demonstrated repeatedly in psychology experiments where our expectations have been deliberately skewed, and the effects are easy to replicate at home. Make up a batch of lemon- flavoured jelly but use food colouring to turn it red and offer it to willing participants. What flavour do they think it is? Few will say lemon, simply because it’s not yellow.

Similarly, if you grow up with parents that loudly vocalise their dislike of a particular food – or it simply never makes an appearance at meal times – then you’re likely to be biased, too. I can’t recall a single time I was given seafood as a child so for years I’ve assumed that prawns were unpalatable. But after a bit of stubborn perseverance, I’ve come to really enjoy eating them (although I will concede there’s a world of difference between well-prepared, fresh prawns and frozen ones sold in enormous value bags).

According to science, then, there’s no physical reason why we should dislike any particular food, and it’s perfectly possible to come round to tastes that would have once made you gag. The key is persistence, and taking the ‘newness’ out of new food – around 10-15 exposures should do the trick, according to one study. Here are some tips to make the process more palatable.