The 29-year-old will become the 14th Doctor on the popular BBC show, after Whittaker announced last July she will be leaving the role.
Scottish actor Gatwa, who was born in Rwanda, starred as Eric Effiong in Netflix's hugely popular Sex Education about socially awkward high school student Otis (Asa Butterfield) and his sex therapist mother Jean (Gillian Anderson).
He said: "There aren't quite the words to describe how I'm feeling. A mix of deeply honoured, beyond excited and of course a little bit scared. This role and show means so much to so many around the world, including myself, and each one of my incredibly talented predecessors has handled that unique responsibility and privilege with the utmost care.
"I will endeavour my upmost to do the same. Russell T Davies is almost as iconic as the Doctor himself and being able to work with him is a dream come true. His writing is dynamic, exciting, incredibly intelligent and fizzing with danger.
"An actor's metaphorical playground. The entire team have been so welcoming and truly give their hearts to the show.
"And so as much as it's daunting, I'm aware I'm joining a really supportive family. Unlike the Doctor, I may only have one heart but I am giving it all to this show."
Whittaker took over the Tardis in 2017 as the first female Doctor.
Queer As Folk and It's A Sin writer Russell T Davies is returning as the programme's showrunner after departing the show in 2009.
Davies, who was responsible for Doctor Who's revival in 2005, will be back to celebrate the show's 60th anniversary in 2023, the BBC previously said.
He said: "The future is here and it's Ncuti! Sometimes talent walks through the door and it's so bright and bold and brilliant, I just stand back in awe and thank my lucky stars.
"Ncuti dazzled us, seized hold of the Doctor and owned those Tardis keys in seconds.
"It's an honour to work with him, and a hoot, I can't wait to get started. I'm sure you're dying to know more, but we're rationing ourselves for now, with the wonderful Jodie's epic finale yet to come.
"But I promise you, 2023 will be spectacular!"
The announcement was teased by Davies and Gatwa on Instagram, with a post featuring two heart emojis, a plus symbol and a blue square.