My long standing theory on the tech front has been that the hook in the 80s and early 90s for kids getting into technology was computer games, which were largely marketed to boys.
My little sister, however, was born in 1988, and by the time she was using a computer the primary hook was the internet, which (as I recall) young girls spend more time on than young boys.
Like I had, she learned to program at a young age, knew HTML when she was 11, Java when she was 14, and so on. However, also like me, she had a lot of aptitude for music.
I was fiercely discouraged from music. My parents saw it as a waste of time. Becoming a software engineer was respectable. Heck, I started college in 1997 when it seemed like about the best thing in the universe that a kid could go into.
Now, my sister was encouraged in music. My mom moved 90 miles away so that she could go to a magnet high school for performing arts, my parents bought her a $3000 flute and drove her around the country to top conservatories for auditions when the time came. But even up to her senior year in high school she was considering a double major in physics and music, but the interest in physics was largely downplayed by my parents.
Now, what happened there? Two kids, both good at mathematical stuff and music, same parents, wildly different parenting approaches. I don't think my parents in the meantime considered music any more useful – it was simply acceptable that she do something useless, while I had to do something useful. I think you see where this is going.
In college I noticed this again – the computer science department was about 95% male, while the math department was only 50% male. The difference obviously wasn't in analytical abilities – I think anybody that could get through a math degree could get through a CS degree. No, the difference was that almost all of the girls were minoring in education and intending to become math teachers.
I don't think that everything in the gap is nurture; there's probably some truth to chest-beating nature of starting a company, but the scales certainly are tipped heavily in the direction of boys by our upbringing.