Until wash-fast chemical dyes were widespread (1940’s/50’s) most children were dressed largely in white, whether boys or girls, right up until the age or six or seven. Of course they did wear other colours too, but white was practical as the clothes and nappies could be bleached. As they grew up styles were chosen that were simplified reflections of what adults wore. Red was considered a strong, aggressive, masculine shade associated with the military and virility. While blue had long been associated with the Virgin Mary and was considered delicate, gentle and feminine. So dressing children in paler versions of the adult colours meant boys were often seen in pink, while girls were dressed in pale blue. That is not to say it wasn’t just as often the other way around, but there was not such a hard and fast ‘rule’ as today and no name calling if a boy was wearing pink. Enough doubt existed as to which way was correct that one mother wrote to a magazine for confirmation as to what she should do and childcare manuals would each put forward their favoured choice.
During their early months the little man and little woman dress exactly alike unless Master Baby should have pink for the prevailing color in his wardrobe and its accessories—the baby boy color; while Miss Baby will have blue, as that is supposed to be the girl baby color.
Cost of the American Baby, New York Times, 26 March 1905: page 31
The Baby’s Toilet – Chapter XI – The Baby’s Basket – It is a French fancy to have blue for a boy and pink for a girl, but pale primrose yellow, delicate green, or crimson in winter, look equally well. 
The Care of Children, by Elisabeth Robinson Scovil
The colours had other associations too, not just for gender. Blue was often the usual colour of school uniforms, for boys and girls as it was associated with seriousness and study. Pink was linked to childhood and softness, play and being carefree.
Much later, the stereotypes we are familiar with today began to prevail. This was partly influenced by the Hindu ideas British people brought from their Indian sojourns. Some Indian traditions said that blue was ‘heavenly’ and therefore Male and pink was ‘of the flesh’ and therefore Female.
In fact scientific research has been conducted showing that babies and young children of both sexes tend to favour pink. Perhaps there is some evolutionary reason for our tendency to be drawn to colours in the pink/red spectrum, unless it has been drummed out of us by cultural conditioning! Other research shows that women are, on average, more sensitive to colour variation than men which is reflected in a tendency to use more colour words where men group colour together. So don’t just blame gender marketing for your daughter’s pink preference, it’s more that boys are sadly encouraged OUT of it than that girls are pushed that way. Free the PINK!