One should be careful in evaluating a film based on how much of it is fabricated. There is no general guideline to follow as the impact of straying from the historical record varies on a case-by-case basis.
In real life, Turing exposed his homosexuality when he himself reported a petty theft to the police. He tried to cover up the relationship he was having with the possible culprit, Arnold Murray, but to no avail as the police pursued him anyway with regard to the homophobic law of gross indecency. Turing ultimately submitted a five-page statement admitting to his affair with Murray, and this was used as evidence to convict him.
Joan Clarke (Keira Knightley) had already met Turing at Cambridge, where she earned a double first in mathematics, and was already working at Bletchley Park before they were re-introduced. She was doing clerical work, but she was eventually selected to work with Turing’s group due to her expertise in mathematics.
John Cairncross was indeed helping the Soviets, but he did not work with Turing at all, he was part of another group in Bletchley Park, and contact between the two would have been very limited. Alex von Tunzelmann of The Guardian even takes issue with this subplot as Turing is shown covering up for Cairncross after he blackmails him with knowledge of his homosexuality. “This is wholly imaginary and deeply offensive – for concealing a spy would have been an extremely serious matter. Were the makers of The Imitation Game intending to accuse Alan Turing, one of Britain’s greatest war heroes, of cowardice and treason?"
Turing knew that his childhood friend, Christopher Morcom, was very ill for quite some time, so his death was not a dramatic shock, as depicted in the film.
He did not name his code-breaking machine after Christopher either, it was actually called the Bombe. The digital computer he later created was called the Universal Turing Machine.
The flurry of dramatic turns that occurred right after Turing’s machine decoded its first day of messages did not happen.
The most extensive dramatization involves Turing’s success with decoding Enigma. After Turing finishes building his machine, it doesn’t actually crack Enigma until Turing experiences an epiphany spurred on by an anecdote between two of his colleagues. He realizes that the machine could succeed in breaking Enigma if it was given a few words that were already decoded, information the British already had thanks to a routine phrase that concluded every German transmission that began the day. In reality, the concept of using at least one decoded character as a starting point is a basic tenet of code-breaking, and it is highly unlikely that Turing would even design a machine without realizing this concept first. Graham Moore admitted to fabricating this part of the film, arguing that they wanted a plot reversal that was simpler and easy to understand. The actual historical record was considered too dry and complex to work as dramatic material.
Detective Robert Nock is actually a fictional character, he does not exist in real life. (For that matter, much of Turing’s confession to Nock would seem unlikely given the confidential nature of Turing’s work.)
It’s also worth noting that in real life, Turing did not send a letter to Churchill on his own - it was actually co-signed with his colleagues who shared in his frustration. Furthermore, while Turing was put in charge for a short time, Hugh Alexander would eventually take the lead when it became apparent that he was more suitable than Turing in handling the bureaucracy.