It's no exaggeration to say that Alan Turing was one of the greatest minds of the modern age. His work as a mathematician created the foundation for computer science. Even though crude computers were just being built, he came up with theories about Artificial Intelligence that are still influential. His contributions in other fields, such as Chemistry, that are also substantial.
His genius became essential to the Allied efforts to break the German Enigma Code in WWII. Working for the British Government, Turing created and refined methods to break the most complex cypher in use. it's difficult to imagine how difficult this problem was to solve, but to give you a sense: consider that there are 10 to the 22nd power possible combinations in the Enigma code. That means 1,000,000,000,000,000,000,000 possible codes. Turning figured out how to use a simple computer to test these possible solutions. To do this, he invented the logic behind "the bombe"--a cryptanalytic machine that tested possible Enigma code settings.
Professor Jack Good, cryptanalyst working at the time with Turing at Bletchley Park, later said: "Turing's most important contribution, I think, was of part of the design of the bombe, the cryptanalytic machine. He had the idea that you could use, in effect, a theorem in logic which sounds to the untrained ear rather absurd; namely that from a contradiction, you can deduce everything." (source)
Eventually his team was breaking 3,000 messages a day! We cannot underestimate how important this contribution was to the war effort.
Turing was relatively open about being homosexual during the war, but after the war was prosecuted for "Gross Indecency" and given the choice of chemical castration (through hormone injections) or jail. He chose castration and underwent the procedure. He was stripped of his security clearances. In 1954, a year after his conviction, he was found dead in his home from cyanide poisoning. The circumstances are ambiguous, which suggests that his death may have been accidental (from the careless handling of lab chemicals) or even murder. The assassination theory is based on the anxiety at the time of the KGB compromising people using homosexuality to entrap them. This was the time of the Cambridge Five, after all.
Suicide is the most likely answer. Indeed, he did report feeling hounded by the crown. The court-ordered hormone injections led to some disturbing side effects, like the growth of breasts, that he had to live with. He was only 41 when he died. Who knows what his contributions could have been had he lived longer.
Recently the British Government finally apologized for its treatment of Turing after the war. About time!