1580s, "student of the classical humanities, one accomplished in literature and classical culture," from Middle French humaniste (16c.), formed on model of Italian umanista "student of human affairs or human nature," coined by Italian poet Lodovicio Ariosto (1474-1533), from Latin humanus "human" (see human (adj.).
In this use, the original notion appears to be "human" as opposed to "divine," that is, a student of the human achievements of the pre-Christian authors and philosophers, as opposed to the theological studies of the divines. As "this new-old learning had, or was credited with, a tendency to loosen the hold of the Church upon men's beliefs," humanist also gradually came to mean "free-thinker" [Fowler]. Philosophical sense is from 1903, from Comte's Religion of Humanity (compare humanism), unconnected to the two earlier meanings, "though accidentally near one of them in effect" [Fowler].