Skipper Sarfraz Ahmed was unbeaten on 13 and Haris Sohail 19 as Pakistan still need another 69 runs in the final session to take a 1-0 lead in the two-match series.
Earlier, leg-spinner Yasir Shah took 5-51 -- his 32nd five wicket haul in Tests -- to dismiss Sri Lanka for 138 in their second innings.
With the ball taking spin on a difficult Sheikh Zayed Stadium pitch, Pakistani batsmen struggled against veteran left-arm spinner Rangana Herath (2-19) and off-spinner Dilruwan Perera (2-25).
Perera then had Shan Masood (seven) and a shaky Babar Azam for three to leave Pakistan struggling at 32-4. In between fast bowler Suranga Lakmal had Azhar Ali caught behind for nought. Pakistan, led by Shah, bowled well in the morning.
Sri Lanka, who resumed at 69-4, lost their last six wickets for 69 runs. Niroshan Dickwella fought hard during his unbeaten knock of 40 studded with four boundaries.
The second Test -- a day-night match -- starts in Dubai from Friday.