There can definitely be a biological component, in my observation. My own DD astounded us. When she was a toddler we wouldn't order separate food for her at a restaurant. One of us (usually me) would order a kid-friendly dish and share with her. It's worth noting that pickiness wasn't an issue at that time, and she'd try anything. The phase came later.

The astounding thing is this: we'd order something that we KNEW DD would like. Maybe it was similar to something we had at home, or maybe it was something she'd had at that restaurant before. She'd take one little taste, and refuse to eat any more. Later that night, whoever had ordered that dish (again, usually me) came down with a mild case of food poisoning. Every time. How she detected there was a problem, I don't know. I sure wish I did.

But don't rule out a psychological component, either. DD once got a case of food poisoning from a piece of pizza (apparently it slipped past her detector), and it was more than a year before she'd try pizza again. That's an interesting one to explain to other moms.

Also, giving her medicine has been, to put it mildly, an an adventure. DD has a talent for quickly progressing from mild sinus issues to bronchitis, and she has such an aversion to taking medicine that she has, at times, made herself so upset she threw it up. Whether the medicine tastes good or not makes no difference. Because so much of her medicine is cherry-flavored, she has transferred that aversion to all things cherry. Honestly, what kid doesn't love a cherry popsicle?

Along the same lines, my brother was preschool aged when he hold of our mom's meatloaf sandwich, which was coated in grandpa's homemade salsa. Nevermind spicy, it was many years later before he'd eat anything red.