1530s, "Roman magistrate of 5c. B.C.E. who took censuses and oversaw public manners and morals," from Middle French censor and directly from Latin censor, from censere "to appraise, value, judge," from PIE root *kens- "speak solemnly, proclaim" (source also of Sanskrit śamsati "recites, praises," śasa "song of praise").
They also had charge of public finances and public works. Transferred sense of "officious judge of morals and conduct" in English is from 1590s. Latin censor also had a transferred sense of "a severe judge; a rigid moralist; a censurer."
From 1640s as "official empowered to examine books, plays (later films, etc.) to see they are free of anything immoral or heretical." By the early decades of the 19c. the meaning of the English word had concentrated into "state agent charged with suppression of speech or published matter deemed politically subversive." Related: Censorial;censorian.