late 14c., philologie, "love of learning and literature; personification of linguistic and literary knowledge," from Latin philologia "love of learning, love of letters, love of study, literary culture," from Greek philologia "love of discussion, learning, and literature; studiousness," in later use "learning" in a wider sense, from philo- "loving" (see philo-) + logos "word, speech" (see Logos).
Compare the sense evolution of Greek philologos, "fond of words, talkative," in Plato "fond of dialectic or argument," in Aristotle and Plutarch "fond of learning and literature," in Plotinus and Proclus "studious of words."
The meaning "science of language" is attested by 1716 (philologue "linguist" is from 1590s; philologer "linguistic scholar" is from 1650s); this confusing secondary sense has not been popular in the U.S., where linguistics is preferred. Related: Philological; philologic.
Philology reigned as king of the sciences, the pride of the first great modern universities--those that grew up in Germany in the eighteenth and earlier nineteenth centuries. Philology inspired the most advanced humanistic studies in the United States and the United Kingdom in the decades before 1850 and sent its generative currents through the intellectual life of Europe and America. It meant far more than the study of old texts. Philology referred to allstudies of language, of specific languages, and (to be sure) of texts. Its explorations ranged from the religion of ancient Israel through the lays of medieval troubadors to the tongues of American Indians--and to rampant theorizing about the origin of language itself. [James Turner, "Philology," 2014]