The actor, 27, joined the dance duo on The Other Stage as they launched into a cover of the programme's iconic theme tune.
Smith appeared on stage saying "What up, baby," before calling on the crowd to "let me hear you roar!".
His appearance came as the current series of Doctor Who finished on BBC1 the night before on Saturday.
Glastonbury was awash with guest appearances over the weekend - Radiohead's Thom Yorke, Kylie and U2's The Edge all dropped in unannounced to perform at the bash.