The theory of Symbolic Interactionism, developed by George Herbert Mead, argues that communication during interactions is how we learn social cues. Although the theory was not specifically designed for gender development, it is a relevant contribution to the field.
When we react in certain ways and communicate children our happiness or frustration due to their behaviour, girls and boys learn what characteristics belong to each gender in a particular society. Through the use of symbols, which in this case would be the words we use, and through our interactions with them, their gender identity develops.