Pakistan were bowled out for 101 in 17.4 overs with Nuwan Pradeep and Isuru Udana taking three wickets apiece.
Gunathilaka's 134-ball 133 lifted Sri Lanka to a 297/9 but Pakistan chased down the target for their first series win in 15 months.
The three-match T20I series gets underway from September 1, with all games to be played in Pallekele.
Danushka Gunathilaka and Sadeera Samarawickrama put on 154 in 27 overs at Katunayake.
At stumps on the second day, Sri Lanka were 160/2, holding an overall lead of 100
Sri Lanka's bowlers restricted England to 336 all out in their first innings of the third and final Test on Saturday as the visitors' tail folded inside half an hour.
Defeats in Galle and Pallekele have left Sri Lanka needing to win the Colombo Test to avert their second whitewash since India toured in 2017.
The SLC have named Danushka Gunathilaka, who has played five Tests, as replacement for the injured Chandimal.
Kumara, who has played 12 Tests and picked 40 wickets, will be replaced by Dushmantha Chameera.
"It is disappointing to lose out on a player, but we will not tolerate any indiscipline," said Angelo Mathews.