Great minds think alike' isn't especially old as proverbs go, but the thought behind it dates from at least the early 17th century. The impressively named Dabridgcourt Belchier wrote this in Hans Beer-Pot, 1618:
Though he made that verse, Those words were made before. Good wits doe jumpe.
That citation uses 'jump' with a meaning long since abandoned in everyday speech, that is 'agree with; completely coincide'. Laurence Sterne repeated that usage in Tristram Shandy, 1761:
Great wits jump: for the moment Dr. Slop cast his eyes upon his bag the very same thought occurred.
The 'think alike' version wasn't found in print until some time after that. The earliest example that I have found is in Carl Theodor von Unlanski's biography The woful history of the unfortunate Eudoxia, 1816:
It may occur that an editor has already printed something on the identical subject - great minds think alike, you know.
Thomas Paine, the English-born revolutionary who became one of the founding fathers of the USA, like many today, had a different response to the idea that 'great minds think alike', that is, "No, they don't". He expressed that opinion in the 1792 political pamphlet The Rights of Man, edition 2 :
I do not believe that any two men, on what are called doctrinal points, think alike who think at all. It is only those who have not thought that appear to agree