The news was confirmed by the official Doctor Who Twitter account which said that Barnard would be playing "the mysterious Roger ap Gwilliam".
The Peaky Blinders actor was most recently seen in Netflix's 1899 which was cancelled despite critical praise and high viewership.
Read more: The most exciting TV of 2023
He has also starred in The Goldfinch, Dunkirk and SS-GB.
The BBC also confirmed the return of Jemma Redgrave to Doctor Who where she will reprise her role as Kate Stewart.
She made her first appearance on the show in 2012 and has appeared intermittently ever since in Jodie Whittaker's final episode The Power of the Doctor.
Redgrave's role in the upcoming specials will mean she has appeared in the show alongside four different iterations of the Doctor – Matt Smith, Peter Capaldi, Jodie Whittaker and David Tennant who will play the 14th Doctor after also playing the tenth.
🚨 Cast announcements 🚨
UNIT returns! Jemma Redgrave returns as Kate Lethbridge-Stewart, and UNIT, the long-running organisation set on defending the Earth, returns in the next series of #DoctorWho.
Aneurin Barnard also joins the series as the mysterious Roger ap Gwilliam. pic.twitter.com/OkDsuC2ZMh
— Doctor Who (@bbcdoctorwho) January 9, 2023
The Doctor Who 60th anniversary specials are expected to air this November with Tennant starring in three episodes before handing the role over to Ncuti Gatwa who has been cast as the fifteenth Doctor.
The late Bernard Cribbins also filmed scenes for the show before he died last year while Jacqueline King and Karl Collins are also confirmed to reprise their roles as Sylvia Noble and Shaun Temple.
Neil Patrick Harris has also been cast, playing an undisclosed villain.
On announcing his casting, Russell T Davies said: “It’s my huge honour to open our studio doors for the mighty Neil Patrick Harris… but who, why, what is he playing? You’ll just have to wait.
"But I promise you, the stuff we’re shooting now is off the scale. Doctor beware!”
Watch below: Billie Piper reacts to Russell T Davies returning to Doctor Who.