c. 1600, "group of students," in U.S. especially "number of pupils in a school or college of the same grade," from French classe (14c.), from Latin classis "a class, a division; army, fleet," especially "any one of the six orders into which Servius Tullius divided the Roman people for the purpose of taxation;" traditionally originally "the people of Rome under arms" (a sense attested in English from 1650s), and thus akin to calare "to call (to arms)," from PIE root *kele- (2) "to shout." In early use in English also in Latin form classis.
Meaning "an order or rank of persons, a number of persons having certain characteristics in common" is from 1660s. School and university sense of "course, lecture" (1650s) is from the notion of a form or lecture reserved to scholars who had attained a certain level. Natural history sense "group of related plants or animals" is from 1753. Meaning "high quality" is from 1874. Meaning "a division of society according to status" (with upper, lower, etc.) is from 1763. Class-consciousness (1903) is from German Klassenbewusst.
The fault, the evil, in a class society is when privilege exists without responsibility and duty. The evil of the classless society is that it tends to equalize the responsibility, to atomize it into responsibility of the whole population—and therefore everyone becomes equally irresponsible. [T.S. Eliot, BBC interview with Leslie Paul, 1958]