The pioneering mathematician, whose code-breaking skills are said to have shortened World War Two by two to four years, lost his job with the secret service following a conviction for indecency and was forced to undergo chemical castration.
Robert Hannigan is the director of Government Communications Headquarters (GCHQ), the successor to the Government Code and Cypher School which first employed and then summarily fired Mr Turing.
LGBT individuals were banned from joining the espionage organisation until the 1990s, because of what Mr Hannigan referred to as "completely archaic rules on sexuality".
Speaking at a conference hosted by gay rights charity Stonewall, he said he had been asked to apologise and added: "I am happy to that today and to say how sorry I am that he and so many others were treated in this way, right up until the 1990s when the policy was rightly changed.
"The fact that it was common practice for decades reflected the intolerance of the times and the pressures of the Cold War, but it does not make it any less wrong and we should apologise for it.
"Their suffering was our loss, and it was the nation's loss too, because we cannot know what [those] who were dismissed would have gone on to do and achieve. We did not learn our lesson from Turing."
Mr Turing received an OBE in 1945 for his work during World War Two, when he and his colleagues in Bletchley Park's Hut 8 constructed code-breaking devices that cracked German ciphers.
By decoding messages from the Nazi Enigma Machine, Mr Turing helped Britain to reverse its fortunes in the Battle of the Atlantic, locating German U-Boats and arguably turning the tide of the war.
However, in 1952 he pled guilty to a charge of public indecency, admitting he was in a homosexual relationship with Arnold Murray. Offered the choice between prison and libido-reducing injections, he opted for the latter.
The chemical castration rendered him impotent, and he is believed to have killed himself in 1954 by eating an apple laced with cyanide.
Stonewall chief executive Ruth Hunt said: "It’s vital that we leave no stone unturned to ensure that every single lesbian, gay, bi and trans person feels able to bring their whole self to work and is accepted without exception."
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies