Gul destroyed India's top order in a destructive spell of 12 overs which reduced India to 127 for six before Yuvraj's gritty knock helped India recover to 234 for seven by tea on the opening day on Monday.
Irfan Pathan was unbeaten on 33 at the break, having added 87 valuable runs so far for the eighth wicket with Yuvraj.
Left-handed Yuvraj, who came to bat with the tourists reeling at 94 for four hit 13 boundaries and two towering sixes to thwart an impressive charge by Gul.
Gul, who turns 20 next week, claimed the prize wickets of Virender Sehwag and Sachin Tendulkar in successive overs and the vital one of Venkatsai Laxman just before lunch.
Stand-in captain Rahul Dravid, who elected to bat on a grassy pitch, resisted for nearly two hours to take India to 107 for four by lunch, before Gul claimed two more wickets to better his previous best of 4-58 against Bangladesh at Multan last year.
Gul had Dravid caught in the slips for 33 after lunch and then trapped Parthiv Patel leg-before without scoring.
Express pacer Shoaib Akhtar took his first wicket in the series when he had Ajit Agarkar caught behind by wicketkeeper Kamran Akmal.
Pakistan, who trail 0-1 in the three-match series after losing the first Test at Multan by an innings and 52 runs, made an impressive start in the morning.
The first break was provided by Mohammad Sami who had Akash Chopra leg-before in the second over.
Sehwag, who hit an epic 309 in the Multan Test, appeared to continue the same form when he began by slashing Shoaib Akhtar for a six over point.
Gul forced an edge off Sehwag's rampaging blade to carry to Akmal after the opener had made a rapid 39 with six boundaries and a six.
In his next over, Gul trapped Tendulkar leg-before for two to leave India at 75 for three.
Laxman, who made 11, edged an outswinger off Gul to second slip where Taufiq Umer took a low catch.
India brought in seamer Agarkar in place of the injured Zaheer Khan in the side that won the first Test.
Pakistan was forced to make four changes after injuries to Abdul Razzaq (back problem), Shabbir Ahmed (shin) and wicketkeeper Moin Khan (groin) in addition to dropping out of touch off-spinner Saqlain Mushtaq.
Their places were taken by left-handed batsman Asim Kamal, Gul, reserve keeper Akmal and leg-spinner Danish Kaneria.