Tim Paine's men were earlier bowled out for just 145, severely diminishing any hopes of winning their first test series in Asia since 2011.
Fakhar Zaman and Azhar Ali scored half-centuries for the hosts.
Last time in October 2016, Pakistan won a Test match in United Arab Emirates (UAE) against West Indies at Abu Dhabi.
Fast bowler Mohammad Abbas had Usman Khawaja - who scored a fighting 141 to lead Australia's fightback for a draw in the first Test in Dubai last week - caught behind for his 50th Test wicket in 10 Tests.
Australia's punishment for a diabolical morning is the prospect of another full day in the field, with Pakistan having three days left to secure what in all likelihood will be series-clinching victory.
Zaman scored almost three quarters of his runs on the offside, hitting eight fours and a six in his 198-ball knock.
Huawei Mate 20 Pro pricing and release details
Both phones feature a radial camera setup sitting inside a square module, with a flash completing the four corners of it. Along with the chipset, the devices in the Huawei Mate 20 series feature top-tier specs in most other categories.
Fakhar hit seven boundaries in an enterprising knock.
His absence will necessitate changes to the batting order with Fakhar Zaman the only other specialist opening batsman in the squad, although he is yet to make his Test debut at the age of 28 and not played a first-class match in more than a year.
Australia kept the same eleven from the first Test.
Leg-spinner Yasir Shah added insult to injury when he provided another breakthrough in shape of Mitchell March (14) and left Australia 75/5.
He then had Head caught in the second slip to leave Australia at 56 for four.