Gatiss has previously written six episodes for the series (The Unquiet Dead; The Idiot's Lantern; Victory of the Daleks; Night Terrors; The Crimson Horror; Cold War) as well as the acclaimed drama based on the origins of the series, An Adventure In Space And Time.
Gatiss confirmed the news on Twitter after telling reporters in Brazil that he would be writing two episodes for new Doctor Peter Capaldi.
He recently told Digital Spy that Capaldi would have an "exciting and disturbing" debut in the series.
Peter has a very different energy to Matt Smith and to David Tennant. He's older which changes everything ... it's amazing what a change does! Matt was sublime and I was very sorry to see him go, but it's also great to have a change, as it has always been with the Doctor.