I'm curious about the concept and origin of gendered nouns. In a modern romance language such as Spanish, nouns are masculine or feminine which I'll describe as anthropomorphic labels. From my schoolboy Latin, I recall the declensions but not gender (it was a very long time ago). From a little research I've learned Latin had the concept of gendered adjectives, but my question is were they even then referred to using the same anthropomorphic labels as today, ie. masculine/feminine, or were they simply type A or type B with the anthropomorphic connotations grafted on later.
Yes, Latin had a distinction between masculine and feminine nouns (and also a third category, "neuter"). This didn't always correspond to biology—homo "human" is always masculine, even when referring to a woman, and persona "person" is always feminine, even when referring to a man—but most words for humans and animals match their gender to their referent's.
Of course, most nouns don't describe humans and animals, and there's nothing especially male or female about water, roads, the sky, etc. So we could just call them "category A" and "category B" (and "category C") if we wanted. But it helps to have more memorable labels, and one of the most consistent rules about this is that names for men tend to be masculine and names for women tend to be feminine. (Though even this has exceptions!) As a result, since ancient times there's been a convention to refer to these categories as "masculine" and "feminine" (and "neuter").
The origin seems to go all the way back to Proto-Indo-European. It's likely that, originally, there were only two categories, "animate" and "inanimate", and this is the system we find in e.g. Hittite. But at some point, a special marking was devised for female humans and animals, and this split the "animate" category into "default/masculine" and "feminine".
It's hard to say any more than this with certainty, because it happened so long ago and evidence is scarce. But it's true that most Indo-European languages treat the masculine as the default gender for humans, and the feminine as the unusual or marked one. (For example, a group of men and women together will usually take a masculine adjective.) It would make sense if this came from the feminine gender being split off at a later point, compared to the masculine and neuter.
Most1 Afroasiatic Languages also have noun gender. This appears to indicate it was likely a common feature of Proto-Afroasiatic, and not borrowed later from contact with Indo-European. I'm not sure about the research on how the use of their grammatical gender may have changed over time, but it seems safe to speculate that the features that are common in all branches haven't changed that much since those branches diverged.
In Proto Indo-European, it seems like the grammatical gender may have originally have been more of an animated-vs.-inanimate designator(PDF). However, the "animate" nouns seem to have split into genders (leaving us with masculine, feminine, and neuter) before Romance/Latin developed its own identity. The best guess for the change seems to be sometime after Anatolian split off. That's sometime around 4kBCE, or about 3,000 years before Latin's Italic became its own family.
1 - According to Frajzyngier et. al. The Afroasiatic Languages, all branches but not all languages of the Afroasiatic language family have gendered nouns.