West Indies were 27 without loss at tea with openers Darren Bravo 15 not out and Leon Johnson 12 not out.
Earlier, Gabriel took a career best 5-96 for his first five-wicket haul to dismiss Pakistan for 452 an hour before tea.
Bravo, who hit a fighting 116 in the first Test in Dubai, had to open the innings after Kraig Brathwaite went off the field during Pakistan's batting and was unable to start the innings.
Earlier, Pakistan skipper Misbah-ul-Haq was unlucky to miss his 11th Test century by just four runs but Sarfraz Ahmed (56) and Mohammad Nawaz (25) added 70 for the seventh wicket to ensure Pakistan crossed 450-mark.
More From This Section
Gabriel, whose previous best of 3-10 came against Zimbabwe at Bridgetown in 2013, had dismissed Misbah in the first session before bowling Ahmed soon after lunch.
He dismissed Zulfiqar Babar for nought to wrap up the innings.
Sohail Khan hit five boundaries before he became one of three victims for Jason Holder, who finished with 3-47.
Shah was fortunate to escape a leg-before review off fast bowler Jason Holder but Misbah was unlucky to be dismissed in the next over.
Misbah missed an incoming delivery which hit him in front of the wickets, with English umpire Michael Gough raising his finger. The Pakistani skipper reluctantly reviewed the decision but without success.
He hit four boundaries and two sixes during his 162-ball stay.
Shah was the next to go as he pulled fast bowler Jason Holder straight to square-leg fielder Devendra Bishoo after scoring 23.
Pakistan leads the three-match series 1-0 after winning the first Test -- a day-night affair played with pink ball -- by 56 runs.