The concept is sound and has already evolved, for example in the Planaria flatworm and other organisms.
These organisms appear to store memories not (just?) in their brains but in specialized DNA sequences, that are then "re-read" upon occasion. As a result, a decapitated planaria will grow back its head and remember things that happened before it lost its brain.
Injecting cellular DNA (not nuclear DNA) into a Planaria also works. The memories are not active, they appear to need to be "restimulated", but if you teach something to a Planaria after, say, 200 repetitions, the receiving "blank" Planarias will learn it after just one repetition.
There is a SF/Horror story ("David's Worm" by Brian Lumley) in which a boy takes home a mutated Planaria and frees it in a pond, whereupon the planaria proceeds to eat all fishes in the pond, growing in size and acquiring the fish' knowledge
until the child disappears, and the mother breaks out in hysterics when the following morning she sees a shapeless lump of protoplasm sitting in the child's breakfast chair and calling her Mommy.
How it could work
Each brain neuron assigns itself a non-unique semi-random DNA UID during early development; this UID depends on the nearby neurons, in other words the neuron has something akin to a postal code. All neurons in a given neighbourhood will very likely share the same UID or similar versions of the same.
Then, the neuron behaviour is based on the state of its microtubule network - I'm cribbing this off Penrose and Hameroff's OOR theory of consciousness - but this state is initialised and refreshed off specific strings of DNA. This "memory DNA" circulates reasonably freely in the organism as tightly wound DNA minutes, and is "read" based on an initiator sequence that, you guessed it, includes a UID. So, the neurons in the speech center will only ever decode speech-center memory tapes.
We need two more details here - a mechanism for the DNA records to cross the blood-brain barrier, and a mechanism to improve efficiency by "steering" these DNA droplets based on their UID.
Finally, the neurons continuously dump their state in the form of new DNA circles (this is the farthest-fetched part). The "old" circles degrade with time, and are replaced by more experienced ones. Renewed experiences create more circles, and therefore linger in the memory longer.
To do this we can reuse the same strategy employed by telomeres: a DNA record is "born" with a TTL sequence of, say, sixteen blocks containing its UID and a "written" flag. When a record has a "written" flag on the outside, all brain cells kick it out as fast as they can. The record gets dumped outside the blood-brain barrier, where an enzyme that does not cross the barrier removes the "written" flag with low efficiency (it takes on average a couple of hours). When the stripped record comes back into contact with the barrier, it's now exposing a naked UID, so it gets dumped inside the brain and steered where it needs to go. There it gets "read", and the UID is stripped, exposing the "written" flag below. After (say) sixteen cycles, the record has no flags or UIDs and is destroyed.
And when the mother bears a child, the egg's cytoplasm will include a significant quantity of DNA circles (I was wrong, this is the farthest-fetched part). While the child develops, its neurons will usually "boot" incorporating some of these memories. Pregnancy hormones might also influence the process.
( Yeah, the genetic memory is matrilinear :-) )
( This also means that blood transfusions will cause privacy issues unless the blood is treated repeatedly with UID-stripper and flag-stripper enzymes )