Origin of the phrases “third time’s the charm” and “third time lucky”?

Solution 1:

I think the origin of these phrases is from Shakespeare's The Merry Wives of Windsor, 1602:

http://books.google.com/books?id=FU2U2eXY5JoC&pg=PA111&img=1&zoom=3&hl=en&sig=ACfU3U35unAFU3SrueMKV2VzabVGl63Acg&ci=115%2C267%2C600%2C387&edge=0

As for which came first, lucky or charm, I found the charm variation earlier and not of American origin as The Phrase Finder has, but British. This is from The Cabinet Album, 1830 (date check):

http://books.google.com/books?id=1mG6OWccGegC&printsec=frontcover&vq=third+time#v=onepage&q=third%20time's&f=false

And the lucky version I found three years later in The Port Admiral, by William Johnstoun N. Neale, 1833 (date check):

http://books.google.com/books?id=WgDkW0mVwWUC&printsec=frontcover&vq=third+time#v=snippet&q=third%20time's%20lucky&f=false

Since these two variations can be traced back to the same time period and the same country, I think it's safe to say they are related and that they both echo Shakespeare.

Edit: Heck, why not throw a pretty Ngram in for good measure:

http://ngrams.googlelabs.com/graph?content=third+time+lucky%2C+third+time%27s+lucky%2C+third+time+is+lucky%2C+third+time+is+the+charm%2C+third+time%27s+the+charm&year_start=1800&year_end=2000&corpus=0&smoothing=3

Solution 2:

Gary Martin at The Phrase Finder has the British phrase third time lucky derived from the earlier "proverbial" luck of the third adventure, traced in print back to 1839. As to the reason for the luck, the theory of it referring to an English law freeing a condemned man after three failed attempts at hanging is debunked. He concludes:

It seems more likely that it is just a folk belief that, having had setbacks, we ought to persevere and not give up. This is enshrined in the phrase 'try, try and try again'. Three seems to be the right number of times to try. Two isn't enough but four is too many. Think of every time you've seen a drama in which a character tries to unlock a door with an set of unfamiliar keys. The first key fails, the second key fails - it is always the third that works.

And on its relatonship to the American version, third time's the charm:

This may be an variant of the earlier 'third time lucky' or it may have arisen independently in the USA.

A citation is given of this phrase from 1912.

EDIT:
Please don't vote this answer up. Google Books tells a different story. See my other answer.

Solution 3:

Jewish tradition teaches that a thing done three times is a chazakah, something the Talmud (Jewish code of legal authority written between 200-800ce) says has the strength of tangible property, something done with the strength of habit and Law.