This is a beautiful video report done showing that children DO know. So when you question, how can a child believe they're a girl or boy. Then you need to sit back and ask yourself, "When did I know I was a girl or boy?" When you get the answer, then know it's the same for them.
Proof is in the pudding!