Chris Grayling, then minister for justice, said the pardon was a “fitting tribute”.
He said: “His later life was overshadowed by his conviction for homosexual activity, a sentence we would now consider unjust and discriminatory and which has now been repealed.
“Turing deserves to be remembered and recognised for his fantastic contribution to the war effort and his legacy to science.
“A pardon from the Queen is a fitting tribute to an exceptional man.”