This paper from Silvia Luraghi explores the origin of PIE grammatical gender system, as well as proposing how it appeared in the language, in a way that accounts for the following discrepancy:
- Hittite - two genders system: animate and inanimate
- Late PIE - typically three genders system: masculine, feminine, and neuter
The animate and inanimate genders would’ve been inherited by late PIE as the masculine and neuter genders respectively, while the feminine would be the result of a derivational suffix *-h₂ being attached to words, and eventually triggering agreement. Note that the typical IE feminine /a/ (you see it in Latin/Romance and Slavic languages, for example) is believed to be from *h₂, as it’s the a-colouring laryngeal.
I know that this paper might be a bit too deep for most folks here to parse, so if you feel intimidated, don’t be afraid to ask for help.
Those are amazing papers - thank you for sharing!