Here is my dirty little secret: as a journalist I have spent nearly two decades writing about girls, thinking about girls, talking about how girls should be raised. Yet, when I finally got pregnant myself, I was terrified at the thought of having a daughter. I was supposed to be an expert on girls' behaviour. What if, after all that, I was not up to the challenge myself?

Then I saw the incontrovertible proof on the sonogram (or what they said was incontrovertible proof; to me, it looked indistinguishable from, say, a nose) and I suddenly realised I had wanted a girl – desperately, passionately – all along. I had just been afraid to admit it. But I still fretted over how I would raise her, what kind of role model I would be, whether I would take my own smugly written advice on the complexities surrounding girls' beauty, body image, education, achievement. Would I embrace frilly dresses or ban Barbies? Push football shoes or tutus?

Shopping for her, I grumbled over the relentless colour coding of babies. Who cared whether the crib sheets were pink or tartan? During those months I must have started a million sentences with "My daughter will never..."

And then I became a mother.

Daisy was, of course, the most beautiful baby ever (if you don't believe me, ask my husband). I was committed to raising her without a sense of limits: I wanted her to believe neither that some behaviour or toy or profession was not for her sex nor that it was mandatory for her sex. I wanted her to be able to pick and choose the pieces of her identity freely – that was supposed to be the prerogative, the privilege, of her generation. For a while it looked as if I were succeeding. On her first day of nursery, at the age of two, she wore her favourite outfit – her "engineers" (a pair of pin-striped overalls) – and proudly toted her Thomas the Tank Engine lunchbox. My daughter had transcended typecasting.

Oh, how the mighty fall. All it took was one boy who, while whizzing past her in the playground, yelled, "Girls don't like trains!" and Thomas was shoved to the bottom of the toy chest. Within a month, Daisy threw a tantrum when I tried to wrestle her into trousers. As if by osmosis she had learned the names and gown colours of every Disney Princess – I didn't even know what a Disney Princess was. She gazed longingly into the tulle-draped windows of the local toy stores and for her third birthday begged for a "real princess dress" with matching plastic high heels. Meanwhile, one of her classmates, the one with two mummies, showed up to school every single day dressed in a Cinderella gown. With a bridal veil.

What was going on here? My fellow mothers, women who once swore they would never be dependent on a man, smiled indulgently at daughters who insisted on being addressed as Snow White. The supermarket checkout girl invariably greeted Daisy with, "Hi, Princess." The waitress at our local breakfast joint, a hipster with a pierced tongue and a skull tattooed on her neck, called Daisy's "funny-face pancakes" her "princess meal"; the nice lady at the pharmacist offered us a free balloon, then said, "I bet I know your favourite colour!" and handed Daisy a pink one rather than letting her choose for herself. Then, shortly after Daisy's third birthday, our high-priced paediatric dentist – the one whose practice was decked out with comic books, DVDs and arcade games – pointed to the exam chair and asked, "Would you like to sit in my special princess throne so I can sparkle your teeth?"

"Oh, for God's sake," I snapped. "Do you have a princess drill, too?"

She looked at me as if I were the wicked stepmother.

But honestly: since when did every little girl become a princess? It wasn't like this when I was a kid, and I was born back when feminism was still a mere twinkle in our mothers' eyes. We did not dress head to toe in pink. We did not have our own miniature high heels. As my little girl made her daily beeline for the dress-up corner of her classroom, I fretted over what playing Little Mermaid, a character who actually gives up her voice to get a man, was teaching her.

On the other hand, I thought, maybe I should see princess mania as a sign of progress, an indication that girls could celebrate their predilection for pink without compromising strength or ambition; that at long last they could "have it all": be feminist and feminine, pretty and powerful, earn independence and male approval. Then again, maybe I should just lighten up and not read so much into it – to mangle Freud, maybe sometimes a princess is just a princess.

The annual toy fair at New York's Javits Center is the industry's largest trade show, with 100,000 products spread over 350,000ft of exhibition space. And I swear, at least 75,000 of those items were pink. I lost count of the myriad pink wands and crowns (feathered, sequined and otherwise bedazzled) and infinite permutations of pink poodles in purses. The Disney Princesses reigned over a new pink royal interactive kitchen with accompanying pink royal appliances and pink royal pot-and-pan sets (though I would have thought one of the perks of monarchy would be that someone else did the cooking). There were pink dinnerware sets emblazoned with the word princess, pink fun-fur stoles and boas, pink golf clubs, sleds, tricycles, bicycles, scooters, and motorcycles and even a pink tractor. Oh, and one pink neon bar sign flashing "live nudes".

It's not that pink is intrinsically bad, but it is such a tiny slice of the rainbow and, though it may celebrate girlhood in one way, it also repeatedly and firmly fuses girls' identity to appearance. Then it presents that connection, even among two-year-olds, between girls as not only innocent but as evidence of innocence. Looking around, I despaired at the singular lack of imagination about girls' lives and interests, at the rows and rows of make-your-own jewellery/lip gloss/nail polish/fashion-show craft kits at the drumbeat of the consumer feminine.

"Is all this pink really necessary?" I asked a bored-looking sales rep hawking something called Cast and Paint Princess Party. "Only if you want to make money," he said, chuckling. Then he shrugged. "I guess girls are born loving pink."

Are they? Judging by today's girls, that would seem to be true – the colour draws them like heat-seeking missiles. Yet adult women I have asked do not remember being so obsessed with pink as children, nor do they recall it being so pervasively pimped to them. I remember thinking my fuchsia-and-white-striped dance shirt with its matching stirrup pants was totally bitchin', but I also loved the same outfit in purple, navy, green and red (yes, I had them all – there must have been a sale). My toys spanned the colour spectrum, as did my hair ribbons, school notebooks and lunchboxes. The original Easy-Bake oven, which I begged for (and never got), was turquoise, and the Suzy Homemaker line – I had the iron, which really worked – was teal. I can't imagine you would see that today. What happened? Why has girlhood become so monochromatic?

Girls' attraction to pink may seem unavoidable, somehow encoded in their DNA, but according to Jo Paoletti, an associate professor of American Studies at the University of Maryland, it's not. Children weren't colour-coded at all until the early 20th century: in the era before domestic washing machines all babies wore white as a practical matter, since the only way of getting clothes clean was to boil them. What's more, both boys and girls wore what were thought of as gender-neutral dresses. When nursery colours were introduced, pink was actually considered the more masculine hue, a pastel version of red, which was associated with strength. Blue, with its intimations of the Virgin Mary, constancy and faithfulness, symbolised femininity. (That may explain a portrait that has always befuddled me, of my father as an infant in 1926 wearing a pink dress.) Why or when that switched is not clear, but many of the early Disney heroines – Cinderella, Sleeping Beauty, Wendy, Alice in Wonderland, Mary Poppins's Jane Banks – were dressed in various shades of azure. (When the company introduced the Princess line, it deliberately changed Sleeping Beauty's gown to pink, supposedly to distinguish her from Cinderella.) It was not until the mid-1980s, when amplifying age and sex differences became a dominant children's marketing strategy, that pink fully came into its own, when it began to seem innately attractive to girls, part of what defined them as female, at least for the first few critical years.

I hadn't realised how profoundly marketing trends dictated our perception of what is natural to kids, including our core beliefs about their psychological development. Take the toddler. I assumed that phase was something experts – people with PhDs at the very least – developed after years of research into children's behaviour: wrong. Turns out, according to Daniel Cook, a historian of childhood consumerism, it was popularised as a marketing gimmick by clothing manufacturers in the 1930s.

Trade publications counselled department stores that, in order to increase sales, they should create a "third stepping stone" between infant wear and older kids' clothes. They also advised segregating girls' and boys' clothing no later than age two: parents whose sons were "treated like a little man" were thought to be looser with their purse strings. It was only after "toddler" became common shoppers' parlance that it evolved into a broadly accepted developmental stage. If that seems impossible to believe, consider the trajectory of "tween", which was also coined, in the mid-1980s, as a marketing contrivance (originally describing children aged eight to 15). Within 10 years it was considered a full-blown psychological, physical and emotional phase.

Splitting kids, or adults, into ever-tinier categories has proved a sure-fire way to boost profits. And one of the easiest ways to segment a market is to magnify gender differences – or invent them where they did not previously exist.

At one time, playthings were expressly intended to communicate parental values and expectations, to train children for their future adult roles. Because of that, they can serve as a Rorschach for cultural anxieties. Take baby dolls. In the late 19th century, industrialisation shifted the source of the family income outside the home. Without the need for free labour, middle-class couples no longer felt compelled to have more than one child. Baby dolls were seen as a way to revive the flagging maternal instinct of white girls, to remind them of their patriotic duty to conceive; within a few years dolls were ubiquitous, synonymous with girlhood itself.

I consulted Lise Eliot, a neuroscientist and the author of Pink Brain, Blue Brain, a fascinating book for which she sifted through more than 1,000 studies comparing males' and females' brains and behaviours. For the most part, at least in the beginning, the behaviour and interests of the two sexes are nearly indistinguishable. Both go gaga over the same toys: until they're about a year old, they are equally attracted to dolls; and until they're around three, they show the same interest in actual babies. Then the whole concept of labelling kicks in – sometime between the ages of two and three they realise that there is this thing called "boy" and this thing called "girl" and something important differentiates them.

The Big Kahuna of sex differences, according to Eliot, is toy choice. Boys push cars, girls push prams. You even see it in primates. In a 2002 study, researchers gave two stereotypically masculine toys (a police car and a ball), two stereotypically feminine toys (a doll and a cooking pot), and two neutral toys (a picture book and a stuffed animal) to 44 male and 44 female Vervet monkeys. The monkeys had never seen the items before and were (obviously) unaware of their connotations. The results? Though males and females were similarly drawn to the neutral items, the males gravitated toward the boy toys, while the females went for the doll and – grrr! – the cooking pot. A fluke? Maybe, but six years later, that finding was replicated by a second group of researchers studying Rhesus monkeys. Meanwhile, among us humans, girls who are born with a genetic disorder that causes them to produce high levels of male hormones are more physically active than other girls and favour traditional "boy" toys.

Toy choice turns out to be one of the largest differences between the sexes over the entire life span, bigger than anything except the preference (among most of us) for the other sex as romantic partners. But its timing and intensity shore up every assumption and stereo-type we adults hold. That blinds us to the larger truth of how deeply those inborn biases are reinforced by a child's environment.

Eliot's own research is in something called "neuroplasticity," the idea that our inborn tendencies and traits, gender-based or otherwise, are shaped by our experience. A child's brain, she explains, changes on a molecular level when she learns to walk, learns to talk, stores a memory, laughs, cries. So though kids may be the most rigid about gender during the princess years, their brains are also at their most malleable, the most open to long-term influence on the abilities and roles that go with their sex. In other words, Eliot says, nurture becomes nature. "Think about language. Babies are born ready to absorb the sounds and grammar and intonation of any language, but then the brain wires itself up to only perceive and produce a specific language. After puberty, it's possible to learn another language, but it's far more difficult. I think of gender differences similarly: the ones that exist become amplified by the two different cultures that boys and girls are immersed in from birth. That contributes to the way their emotional and cognitive circuits get wired."

Hormones, genes and chromosomes, then, aren't quite as powerful as we tend to believe. And that has implications for how we raise and educate our children.

"If you believe it's all immutable, then what is the harm in plunking girls in a pink ghetto or letting boys get by without doing art or singing or all the things they used to like to do before they got associated with girls?" Eliot asks. "But if you believe these disparities in adults are shaped by development and experience…"

I never expected, when I had a daughter, that one of my most important jobs would be to protect her childhood from becoming a marketers' land grab. I have begun to see myself as that hazel tree in the Grimm Brothers' version of Cinderella: my branches offering her shelter, my roots giving her strength. I refuse to believe that parents are helpless. We can provide alternatives, especially in the critical early years when children's brains are most malleable: choices that appeal to their desire to be girls yet reflect parents' values, worldview and dreams for them.

I wish I could tell you that I had reached my own goals: getting my daughter outside more, taking walks in the woods together, playing sports, making art. Occasionally I have – and I advocate all of that – but mostly I have just got a lot more canny about how we participate in the consumer culture. At bedtime we continue to read legends, mythology, and fairytales – all of which teem with complex female characters that fire a child's imagination. The path to womanhood is strewn with enchantment, but it is also rife with thickets and thorns and a Big Bad Culture that threatens to consume them even as they consume it. The good news is, the choices we make for our toddlers can influence how they navigate life as teens. I'm not saying we can, or will, do everything "right," only that there is power – magic – in awareness. If we start with that, with wanting girls to see themselves from the inside out rather than outside in, we will go a long way towards helping them find their true happily ever-afters.

This is an edited extract from Cinderella Ate My Daughter by Peggy Orenstein, published by Harper and available from amazon.com at $25.99