His fighting, unbeaten century kept the Australians ticking along with support from newcomer Peter Handscomb after the loss of three wickets.
At stumps after the key final twilight session under lights, the home side were 288 for three after winning the toss with Smith unbeaten on 110 and Handscomb not out 64.
Smith reached his century off 184 balls with a boundary off Mohammed Amir. Australia lost the wicket of rookie opener Matt Renshaw in the middle session after the dismissals of David Warner and Usman Khawaja in the opening session.
Renshaw did not put a foot wrong in an assured innings until in the 44th over he was caught behind off Wahab for 71 off 125 balls with nine fours.
The youngster looked at ease in only his second Test match and was on course for his maiden Test century before Wahab struck.
It was reward for Wahab, who was Pakistan's best performing bowler, maintaining a tight line and conceding few runs. Wahab had peppered Renshaw with rising deliveries throughout his innings, but the tall youngster got well behind the ball, showing sound defensive technique.
Pakistan struck with two quick wickets in the first session after openers Warner and Renshaw gave Australia a solid start. Paceman Mohammad Amir had Warner leg before wicket for 32 after the Australian vice-captain was struck on the pad on leg stump in the 24th over.
Warner was given out by English umpire Ian Gould and did not seek a review, ending an opening stand of 70. Amir is in the first year of his return to international cricket following a five-year ban over spot-fixing, a scandal which almost ended his burgeoning career.
Khawaja, coming off his man-of-the-match 145 in the day-night third Test in Adelaide against South Africa, lasted just six balls before he was out to a false stroke to leg-spinner Yasir Shah.
Khawaja advanced down the wicket but hit straight into Misbah-ul-Haq's midriff at short midwicket and was on his way for four.