Pat Cummins then got Asad Shafiq for a duck. Babar Azam and Shaan Masood resisted the bowling, taking Pakistan to 64 for 3, trailing by 276.
Skipper Azhar Ali, who resisted Australia's attack in the first innings, fell cheaply.
Starc struck in his second over, and picked up wickets in successive overs to peg Pakistan back.
Yasir Shah helped clean up the tail with Shaheen Afridi to return a four-fer.
Labuschagne came close but couldn't get a double ton, departing for 185
Shaheen then struck twice to pick Paine and Labuschagne.
Labuschagne got to 150.
Matthew Wade scored 60, and along with Labuschagne, added a swift century stand.
Marnus Labuschagne went on to reach his maiden Test century.
Steve Smith then departed soon after Pakistan struck in quick succession.
Pakistan bowled beautifully in the first session, with much discipline to keep Warner in check. He was dismissed for 154, adding only 3 runs to his overnight score.