In retrospect my memories are crystal clear that I always felt I needed to be one of the girls. Going back to my earliest awareness of gender differences when I began preschool at the age of 4. Before that, my sister and I had been raised pretty much the same, and while I knew of the anatomical difference, since we bathed together, I never knew there was supposed to be a gender difference until school sorted out boys and girls into two groups, and right away I instinctively felt I belonged among the girls. I loathed and detested the expectations placed on me to be a boy. But I could never say anything about it. I became silenced. My parents would turn a deaf ear to my gender issues then just as they do now, and their inflexible position has always been that I must conform to what's expected of me, end of story.
I was silenced in a way I've now come to understand is a common experience of oppression for girls in a patriarchal power structure, as it is for queers in a heterosexualist power structure. The powerless are silenced. There is a study of this in the book Women's Ways of Knowing.
Very early in life I learned that I could not do anything about my miserable situation, and what's worse--what horrifies me to see clearly now--I internalized the oppression. I formed the habit of thinking that even though I loathed maleness, there was nothing I could do about it. In fact, at school I learned that failure to demonstrate sufficient masculinity would get me regularly bullied and beaten up. I was a scared little kid in a hostile world, with no support from parents and other authority figures, whose only answer was that I had to become more masculine. I was a shy, retiring type and did not find it within me to rebel and assert my gender needs. So I knuckled under, and went along to get along.
That's how I grew up with the habit of burying and re-burying my innate femaleness every time it came up over the years, and went on trying to live as male even if it killed me. For many years, at least since I was 20 years old, I was consciously aware that I should have been a woman, although I was afraid of transsexualism which seemed too radical and scary. It wasn't until I was 45 that I got up enough gumption to come out and explicitly say I'm trans, I am woman.
So I can't really fix a single age for when I "realized" I was a girl. It depends on the definition of "realize." I wasn't able to articulate it when young, though I have all these cross-gender memories. It was always there, but it had to emerge from deep dark depths of repression, denial, and fear, which took many years before I could consciously own up to the full meaning of it. It will take a lot of healing from all the damage done to me since early childhood. Fortunately I've transitioned and healing is underway.