"Great minds think alike." Anonymous.
An older version was "Good wits jump," from "Good wits doe iumpe," which appears as early as 1618. Jump meant "come together", a meaning that must've been lost soon after the saying was coined. A later version was "Good wits jump together."
Voltaire expressed something similar, "les beaux esprits se rencontrent", which could be translated as "Good minds meet."
The full versions of "Great minds think alike" are "Great minds think alike, but fools seldom differ," and "Great minds think alike, as do lesser ones."
Albert Einstein has his take: "Great spirits have always encountered violent opposition from mediocre minds." I won't quibble with that.