Pakistan will need another seven wickets to force a 1-0 lead in the three-match series after Younis's brilliant 118 helped them set a daunting 491-run target for England.
The first Test ended in a draw in Abu Dhabi.
At close England were 130-3 with Joe Root unbeaten on a fighting 59 and with him Jonny Bairstow on six not out as they still need 361 for an unlikely victory or bat out the final day on a weary Dubai stadium pitch on Monday.
Earlier Pakistan declared 35 minutes after lunch, with Younis scoring his 31st century, Misbah-ul-Haq 87 and Asad Shafiq making 79.
Also Read
England were tottering at 45-2 at tea but Ian Bell (46) and Root defied Paksitan bowling during their 102-run stand for the third wicket and looked to take England safely to stumps.
But Babar broke the partnership when he spun a sharp delivery which Bell tried to leave but gloved it to the slip where Younis took an easy catch.
Root edged Shah through the slips to complete his 16th Test half century, his 12th fifty plus score in 2015 which is a new record for an England batsman beating Keith Fletcher's 11 in 1973.
He has so far hit five boundaries in his resolute 134- ball knock.
It was Khan who provided Pakistan with an early wicket, forcing an edge of Ali's bat to slip where Younis took the catch.
Cook, who scored 65 in the first innings and 263 in the first Test, failed to keep a sweep off Shah down and was smartly caught at deep square-leg by Wahab Riaz.