myusernameis - gut flora certainly isn't the only explanation at all. Do you have an atopic family history (i.e. lots of people who have had hayfever and asthma etc going back generations)? There's undoubtedly fairly clear genetic susceptibility to allergy.
However stuff like gut flora and historical contingency may explain a lot of the variance that isn't accounted for by straight genetics - i.e. why some people end up allergic to a lot of stuff and others in the same family don't.
So, I'm a C section and my sister isn't. We have the same atopic family history, but I also moved hemispheres as a young adult, and got horrendous hayfever. So now I'm allergic to all sorts of stuff, and she isn't. Two small risk factors that change how our mature immune systems work.
The diet of your grandparents could certainly affect your immune system, and indirectly your gut flora.
Various studies show that nutritional status and metabolic status of mothers affect baby's immunological, metabolic and cardiovascular health in later life, e.g. the outcomes of the Dutch famine at the end of WW2. So if your parents have poor nutritional status, smoking-related cardiovascular disease and pre-diabetes, and have a baby, and if that baby then has pre-diabetes and chronic inflammation when she in turn has a child, then yes, indirectly but by fairly direct mechanisms, the health of your grandparents affects you. It's also passed down the male line - study of swedish farmers going back centuries showed that grandfathers who go through a famine have grandsons who had higher relative risk of death .
Similarly, indirectly you get your grandparents' gut flora, not just culturally by having aspects of the same diet, but you get your gut flora from your mother during normal delivery, or if you're born by c-section you get your gut flora mostly from your mother's skin (which is why being born by C-section you have abnormal gut flora, and - assuming the link with immunity - C section is a risk factor for irritable bowel type diseases, and allergy).
Also there's "normal" food (a lot of which is quite surprisingly highly processed) and "McDonalds" levels of processed - I think that "normal" food is probably processed enough to really mess with gut flora.
I grew up eating very healthily, with parents who cared a lot about nutrition, no salt, not much fat, etc - but we still ate white pasta and shop bread, and looking back it was a very low-fibre diet compared to what it could have been, even though it was a high-fibre diet compared to nearly everyone we knew.