Until the late 14th century the word girl simply meant a child of either sex. Boys, where they had to be differentiated, were referred to as knave girls and girls in the female sense were called gay girls. Equally, a boy could be a knave child and a girl a maiden child.
The word, gyrle, circa 1300, meaning “child, young person” is of unknown origin. The Oxford English Dictionary (OED) leans toward the Old English gyrele, from Proto-Germanic gurwilon-, or Low German gære meaning “boy, girl.” The specific meaning of “a female child” is attested from the late 14th century and the meaning “any young unmarried woman” since the mid-15th century.
The term boy, circa 1300, is also of unknown origin and was reserved for servants or churls (person of low birth). The meaning “young man” probably derived from the latter as a pejorative term but hadn’t occurred before the 15th century.
A noticeable number of our modern English words denoting children, such as boy, girl, brat, rascal, and imp were originally colloquial nicknames, derogatory or whimsical, in part endearing, and finally commonplace. Such words, as they occur in many languages, are of the most diverse and often obscure in their origins.