Gatiss has written a number of episodes over different seasons, including The Unquiet Dead, The Idiot's Lantern, Victory of the Daleks, Night Terrors, The Crimson Horror and Cold War, as well as the 50th Anniversary drama An Adventure In Time And Space.
Gatiss confirmed the news via Twitter, posting the following tweet:
To clarify. I've been commissioned to write two episodes of 'Doctor Who'. That doesn't mean they'll both necessarily be in this season.
— Mark Gatiss (@Markgatiss) March 27, 2014