I'm not asking about the origin of grammatical gender. I am asking where is the earliest example of the term "gender" used to describe classes of nouns. I'm wondering who first decided to name grammatical classes of nouns (and their treatment) as "gender" as opposed, say, to "class 1 nouns" and "class 2 nouns," or something otherwise neutral.
It depends on whether you mean strictly English (since gender is an English word) or do you include the historical antecedents in other languages. The origin of the concept and term is Aristotle in Rhetoric (though Aristotle attributes the idea to Protagoras), and the Greek term is genos, which simply means "kind". It worked its way into French as genre, hence gender in English, attested since 1390 (the non-grammatical sense is attested about 100 years later). Aristotle distinguished grammatical gender and sex gender.
The American Heritage Dictionary of the English Language, Fourth Edition, states the following.
[Middle English gendre, from Old French, kind, gender, from Latin genus, gener-. See genə in Appendix I.]
(Appendix I is PIE roots.) This website: https://www.etymonline.com/word/gender, says that even in Latin "genus" could mean sexual gender, as well as things like "family", "rank", or "species" It's grammatical usage, however, seems to stem from the fact that it was used to translate the Greek word "genos" which Aristotle (and others) used as a grammatical term, and which derived from the same PIE root according to Wiktionary (which says its *ǵenh₁- + *-os = "race, lineage") (Keep in mind that h₁ on Wiktionary is ə₁ in my dictionary because its a reconstructed "laryngeal"; also remember Latin, Greek, and probably PIE all had several inflected forms for nouns.)
My dictionary (Amer. Herit. Dict., 4th Ed.) also implies that the terminology may not have caused as much confusion in English, at least, until "recently."
Usage Note Traditionally, gender has been used primarily to refer to the grammatical categories of "masculine," "feminine", and "neuter," but in recent years the word has become well established in its use to refer to to sex-based categories, ... This usage is supported by the the practice of many anthropologists, who reserve sex for reference to biological categories, while using gender to refer to social or cultural categories. ...
This does leave me wondering when the terms "masculine", "feminine", and "neuter" entered the picture. It is not the result of the Latin term, because Aristotle used it in Rhetoric, Book III, Chapter 5 (Bekker # 1407b)
This website: http://www.perseus.tufts.edu/hopper/text?doc=Perseus%3Atext%3A1999.01.0059%3Abekker%20page%3D1407b, yields this original
 τέταρτον, ὡς Πρωταγόρας τὰ γένη τῶν ὀνομάτων διῄρει, ἄρρενα καὶ θήλεα καὶ σκεύη: δεῖ γὰρ ἀποδιδόναι καὶ ταῦτα ὀρθῶς:  “ἡ δ᾽ ἐλθοῦσα καὶ διαλεχθεῖσα ᾤχετο”.
to go with this translation I have by W. Rhys Roberts in Brittanica's "Great Books of the Western World".
(4) A fourth rule is to observe Protagoras' classification of nouns into male, female, and inanimate; for these distinctions also must be correctly given. 'Upon her arrival she said her say and departed (ἡ δ᾽ ἐλθοῦσα καὶ διαλεχθεῖσα ᾤχετο).'
(Note the differing section numbers because they're from 2 different sources. Аlso note that the word "genos" is in the plural form "geni" (γένη) and is translated as "classification" by WRR., ie. "τὰ γένη τῶν ὀνομάτων" means "the classification [of] the nouns")
Aristotle's example involves an actual female person, but Ancient Greek's gender system applied to other nouns as well. (eg. House and voice are feminine; way is masculine.) At this point it may be prudent to consider that gender systems in many languages, including most European languages actually are somewhat related to sexual gender, both because of the usual alignment of animate (esp. human) examples, and because of metaphor and association. Although Indo-European's feminine gender may have originally come from some grammatical inflexion (Anim.=masc vs Inam.=neut. is prob. older), there is a tendency in many languages to put objects associated with women and with men, or with female and male stereotypes/roles, into different noun classes. There is also research indicating that modern speakers of IE languages (even young children) associate objects that have a certain grammatical gender with the associated sexual gender. https://researchonline.jcu.edu.au/31865/1/31865_Alvanoudi_Pavlidou_2013.pdf It strikes me that this might still have something to do with education, but I don't know if that makes it any less important.
Note that many languages have noun-class systems that relate to real semantic (and grammatical) properties of nouns, such as the complex system of Bantu languages with classes for humans, animals, plants, fluids, actions, etc., or the animate-inanimate (or similar) distinctions of some languages, so it's not surprising to me that gender systems would have some (often very vague) semantic content.
EDIT: According to the world atlas if language structures, most languages with grammatical gender systems have distictions associated with sex, and most of the languages that don't are Niger-Congo languages. (https://wals.info/chapter/31 , https://wals.info/feature/31A#2/-20.6/48.4) The following text was written before I knew that.
Most languages with an actually gender-related noun class system (outside pronouns) are either Indo-European or Afro-Asiatic (like Arabic and Hausa), although it does play an important role in some more complex noun class systems, such as the 4-way noun-class system of Dyirbal (in Australia) which is the inspiration for George Lakoff's book Women, Fire, and Dangerous Things. These previous are the reason why the term noun-class is preferred over gender nowadays, though apparently some linguists distinguish between the two concepts. Here's a link for exploring some of the various types of "genders" in the world: https://en.wikipedia.org/wiki/List_of_languages_by_type_of_grammatical_genders
Wycliffe was definitely prominent in introducing the use into everyday language
But here may men betere sey in Latein pe sotilte of pis matere, for articlis wi], case, gendre, and noumbre helpen here for to speke.