— Albert Einstein German-born physicist and founder of the theory of relativity 1879 - 1955
As discussed in this entry from The Quote Investigator http://quoteinvestigator.com/2010/05/04/universe-einstein/#more-173, the earliest published attribution of a similar quote to Einstein seems to have been in Gestalt therapist Frederick S. Perls' 1969 book Gestalt Theory Verbatim, where he wrote on p. 33: "As Albert Einstein once said to me: 'Two things are infinite: the universe and human stupidity.' But what is much more widespread than the actual stupidity is the playing stupid, turning off your ear, not listening, not seeing." Perls also offered another variant in his 1972 book In and Out the Garbage Pail, where he mentioned a meeting with Einstein and on p. 52 http://books.google.com/books?id=HuxFAAAAYAAJ&q=human+stupidity#search_anchor quoted him saying: "Two things are infinite, the universe and human stupidity, and I am not yet completely sure about the universe." However, Perls had given yet another variant of this quote in an earlier book, Ego, Hunger, and Aggression: a Revision of Freud’s Theory and Method (originally published 1942, although the Quote Investigator only checked that the quote appeared in the 1947 edition), where he attributed it not to Einstein but to a "great astronomer", writing: "As modern times promote hasty eating to a large extent, it is not surprising to learn that a great astronomer said: 'Two things are infinite, as far as we know – the universe and human stupidity.' To-day we know that this statement is not quite correct. Einstein has proved that the universe is limited." So, the later attributions in 1969 and 1972 may have been a case of faulty memory, or of intentionally trying to increase the authority of the quote by attributing it to Einstein. The quote itself may be a variant of a similar quote attributed even earlier to the philosopher Ernest Renan, found for example in The Public: Volume 18 from 1915, which says on p. 1126 http://books.google.com/books?id=cTPmAAAAMAAJ&pg=PA1126#v=onepage&q&f=false: "He quotes the saying of Renan: it isn't the stars that give him an idea of infinity; it is man's stupidity." (Other examples of similar attributions to Renan can be found on this Google Books search http://www.google.com/search?q=renan+infinity+stupidity&btnG=Search+Books&tbm=bks&tbo=1.) Renan was French so this is presumably intended as a translation, but different sources give different versions of the supposed original French quote, such as "La bêtise humaine est la seule chose qui donne une idée de l'infini" (found for example in Réflexions sur la vie, 1895-1898 by Remy de Gourmont from 1903, p. 103 http://books.google.com/books?id=RtrtAAAAMAAJ&pg=PA103#v=onepage&q&f=false, along with several other early sources as seen in this search http://www.google.com/search?q=%22humaine+est+la+seule+chose+qui%22+renan&btnG=Search+Books&tbm=bks&tbo=1) and "Ce n'est pas l'immensité de la voûte étoilée qui peut donner le plus complétement l'idée de l'infini, mais bien la bêtise humaine!" (found in Broad views, Volume 2 from 1904, p. 465 http://books.google.com/books?id=9NEaAQAAMAAJ&pg=PA465#v=onepage&q&f=false). Since these variants have not been found in Renan's own writings, they may represent false attributions as well. They may also be variants of an even older saying; for example, the 1880 book Des vers by Guy de Maupassant includes on p. 9 http://books.google.com/books?id=cQUvAAAAMAAJ&pg=PP21#v=onepage&q&f=false a quote from a letter (dated February 19, 1880) by Gustave Flaubert where Flaubert writes "Cependant, qui sait? La terre a des limites, mais la bêtise humaine est infinie!" which translates to "But who knows? The earth has its boundaries, but human stupidity is infinite!" Similarly the 1887 book Melanges by Jules-Paul Tardivel includes on p. 273 http://books.google.com/books?id=n9cOAAAAYAAJ&pg=PA273#v=onepage&q&f=false a piece said to have been written in 1880 in which he writes "Aujourd'hui je sais qu'il n'y a pas de limites à la bêtise humaine, qu'elle est infinie" which translates to "today I know that there is no limit to human stupidity, it is infinite."
Variant: "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." Earliest version located is in Technocracy digest: Issues 287–314 from 1988, p. 76 http://books.google.com/books?id=L7LnAAAAMAAJ&q=%22sure+about+the+former%22#search_anchor. Translated to German as: "Zwei Dinge sind unendlich: das Universum und die menschliche Dummheit. Aber beim Universum bin ich mir nicht ganz sicher." (Earliest version located is Arndt-Michael Meyer, Die Macht der Kürze, Books on Demand GmbH, 2004, p. 14 http://books.google.gr/books?id=12DW-RBKTW8C&pg=PA14&dq=%22Zwei+Dinge+sind+unendlich:+das+Universum+und+die+menschliche+%22+arnd&hl=en&sa=X&ei=gquJUsrYBomM7AapmYGgCQ&ved=0CC8Q6wEwAA#v=onepage&q=%22Zwei%20Dinge%20sind%20unendlich%3A%20das%20Universum%20und%20die%20menschliche%20%22%20arnd&f=false.)