How many and which languages associate gender with nouns? Historically, how did a particular gender come to be associated with a particular noun?
ANSWER PERSON RESPONDS: Hundreds, perhaps thousands. More broadly, these can be called noun classes, and many languages have more than just “masculine” and “feminine.” Those designations, as you suggest, can seem rather arbitrary. Since the languages developed over many millenia, it’s got to be lost to history why one noun is classed this way or that.
For a free online introduction, I recommend the article on “grammatical gender” at http://en.wikipedia.com . It includes long listings of languages with and without grammatical gender, with the disclaimer, “This is an incomplete list, which can or may never satisfy any subjective standard for completeness.” Some languages are gouped in the list (“most Slavic languages”) or only discussed in the essays. It also includes fictional languages, such as Klingon! There’s a nice bibliography, too, if you don’t trust Wikipedia.
