Pakistan made 141-7 with man of the match Shoaib Malik making an unbeaten 42 after Sri Lanka, who rested skipper Mahela Jayawardene and spin wizard Ajantha Mendis, had hit 137-9 off their 20 overs.
Pakistan were struggling at 91-7 at one stage following a four-wicket return for debutant Kaushalya Weeraratne, but Malik and Fawad Alam added 50 in four overs in front of packed King's City ground.
Malik hit the winning boundary off the penultimate ball to send Pakistan top of the table in the four-nation tournament which also features makeweights Canada and Zimbabwe.
Pakistan had needed 13 from the final over but Alam slammed his third six and Malik then sealed victory with consecutive boundaries off Nuwan Kulasekara.
When Sri Lanka batted, opener Sanath Jayasuriya smashed consecutive boundaries off Shoaib Akhtar, but fell next ball when he top-edged to fine leg.
Mahela Udawatte and Jehan Mubarak added 51 for the second wicket but the middle order struggled to push on against Shahid Afridi and Malik.
However, the main late action came from paceman Umar Gul who finished with four wickets.
Both Pakistan and Sri Lanka are expected to meet in Monday's final.
In Saturday's other match Canada and Zimbabwe tied after both sides made 135 but the African side claimed the points when they won a bowl-off.