It is apparently a quotation from Albert Einstein, and Wikiquote has some interesting context and background:
https://en.wikiquote.org/wiki/Albert_Einstein_and_politics
"Great spirits have always encountered violent opposition from mediocre minds. The mediocre mind is incapable of understanding the man who refuses to bow blindly to conventional prejudices and chooses instead to express his opinions courageously and honestly."
--Letter to Morris Raphael Cohen, professor emeritus of philosophy at the College of the City of New York, defending the appointment of Bertrand Russell to a teaching position (19 March 1940).
Notice that although it is phrased as a generality, it is really being applied specifically to Bertrand Russell, who was a great mind, the coauthor of a classic work in mathematical logic, and a Nobel laureate in literature. He was also a pacifist, often considered left wing, who was dismissed from a British university for vocally criticizing the First World War.
So I think Einstein was defending freedom of thought and speech in general, and supporting Bertrand Russell in particular. He wasn't necessarily expressing some general law.