Genetic memory is probably partly a misnomer... it implies that specific memories are passed on through the generations. I don't think anybody believes that this happens.
But there's something going on. There is some way that behaviors are passed along through the genetic code - behaviors that are specific to species, that help them survive and communicate... All cats wash themselves the same way, even if they're raised in isolation from other cats. Where did they learn this? Snakes know how to grab onto, constrict, and then swallow prey. That's a complex sequence for a fairly dumb animal! Bees have a sophisticated, almost over-complex dance that informs other bees where to find flowers... it's based on distance, location of the sun, and other factors. They're born understanding it. Human babies know how to suckle (well, most of them, and without modern medicine the ones that don't would simply die off). The examples are infinite, ranging from the simplistic to the complex.
Somehow creatures are born with some sort of hard-coded behavior... there is some sort of way for behavior to be encoded into DNA and passed down to future generations. We have absolutely no comprehension of this mechanism. We know it happens, but how it happens is a complete mystery. Some of the information passed on this way is ridiculously complex.
Closer to the subject at hand... ants are simplistic, idiotic creatures. They march around in pre-programmed ways (programmed how???), doing tasks, going about their business for the hive... But they exhibit startling complexity as a group. Some people call this a hive mind... but again I think that's a misnomer. I don't think there's any sort of telepathy going on or anything like that.
Think of it this way. When life was evolving, the first "multicellular" creatures were simply colonies of genetically identical cells. For some reason or another, they survived better when they were stuck together in a mass instead of floating around individually. Maybe they could stick to and devour larger chunks of food or something. But eventually, individual cells in these colonies started specializing. Some specialized in absorbing food, some on delivering nutrients to other cells, some were devoted to reproducing... Each cell alone is totally brainless - but together they sort of come together to form a level of complexity that is greater than its individual components.
I think social insects are just another degree of complexity of this exact same concept - except instead of being composed of individual cells, the "creature" is actually composed of individual multicellular creatures. Like the cells of primitive multicellular organisms, they each contribute a specific task. They locate food, nurture the young, defend the colony, reproduce, farm, herd, hunt... and so on. Individually they are dumb, chitinous lumps of protein. But together, they form a complex system that is not unlike a unique order of creature in its own right. It still has very little "mind" to speak of - which is one reason I don't like the term "hive mind." But perhaps, as a larger entity, it carries on its own set of genetic memories, just like the more complex, more intelligent "non-hive" individual animals? It "knows" to create reproducers in certain proportions to food gatherers, how to build and layout a complex series of tunnels (most ant species have a specific layout they follow -- some are extraordinarily complex, with spiral structures, vents to allow fresh air in and waste air out, and so on), to breed extra soldiers after fighting off an attack... simple things, but things no individual ant actually knows.