It is a good question on how our gender roles are formed and when does it happen. I’ve read loads of investigations on the topic. Most of them were from the psychological perspective of course.
First of all, we need to define, when does socialization happen to a child? I believe it occurs from the very beginning, in a family. A child observes mother’s and father’s behavior. Those are first role models to follow. The child learns a lot from parents: how to walk, talk, play, eat, behave. It all happens before making friends in yard, kindergarten or pre-school.
Parents may make a direct or indirect impact on the emergence of gender differences. A direct one happens, when parents actively point out a ‘proper’ behavior for a girl/ a boy and demand it from their child. An indirect impact happens, when child naturally observes possible differences between mother’s and father’s behavior (if present) and follows one of them correspondingly to their sex or gender role they prefer.
Such an approach might become a problem for the same-sex couples, who are having a child. I consider this type of ‘parental impact’ on child's future gender role to be absurd. Even socialization with other children in school or kindergarten won’t play much. A child chooses his or her gender role when growing up. It is a conscious position, nothing more, nothing less. Do not overestimate socialization. It is only the way we communicate with other people. Gender role we prefer is something from the inside, a feeling, and understanding of yourself. It cannot be formed out by society.
Socialisation imprints on the personality of the child the ascribed social and gender roles
As for me, gender differences arise in more or less conscious period, when a child attends big groups of people (in school or kindergarten). It is a first-time child meet different behavior models, that vary from those they were used to at home. Yeah, parents might have their impact, but I don’t think their behavior is taken too seriously by children. Also, we should point out the teenage period of life. This is the point where a person makes first conscious choices to understand him- or herself. It is the period of self-evaluation, self-learning and the time of making fundamental life-long decisions of self-understanding. I believe at this vulnerable time; a person might want to meet society’s expectations on the gender role they choose. The opposite situation might also happen, but won’t that also be society’s impact?