When used as a compound adjective (two or more words functioning together as a single adjective), six-year-old should be hyphenated. Yes, all of it.
Add a comma after six-year-old, because that part of the sentence the first part of an if/then statement (even though the word then is left out, as it often is).
“If you can’t explain it to a six-year-old, you don’t understand it yourself.”
Now let’s address the faulty assumption aspect of this “glitch.” If you have two people with the same IQ (give or take a couple of points), and one says ‘If you can’t explain something to a little kid, you don’t know it yourself,’ and the other says the first one is wrong, whom do you believe? The first one, of course, because if he didn’t know literally everything about everything better than anyone else, why’d they call him Einstein?
Sorry — the snark/sarcasm is strong today.
Not all six-year-olds are created equal, y’know? (Dammit, WordPress spell checker, those hyphens do belong, and it is possible to have more than one six-year-old mentioned in a sentence. I’m getting tired of your nonsense…) Some kids get it the first time when you explain something to them, because they’re (wait for it…) highly intelligent, and some are never going to understand because they have some sort of intellectual/cognitive disability — or maybe they’re perfectly normal and just aren’t paying attention because they don’t give a damn. (In this way, six-year-olds are much like a couple of Millennials I know.) Whatever the reason, it cannot be assumed that any lack of understanding must always be the fault of the person giving the explanation.