The 34-year-old Vandersay, a late replacement for injured spinner Wanindu Hasaranga who was ruled out of the series ahead of the match, took the first six wickets to fall in India's chase of 241 for victory at Colombo's R. Premadasa Stadium.
Skipper Charith Asalanka took three wickets to bowl out India for 208 and take a 1-0 lead in the three-match series after the opener ended in a tie.
India skipper Rohit Sharma hit 64 and handed the team a strong start in his 97-run opening stand with Shubman Gill, who made 35, before Vandersay wreaked havoc with his leg-spin.
"Lot of pressure coming into this game. I am coming after a long lay-off and I had to do something," Vandersay said after being named player of the match.
"Credit to our batters. They put a competitive total on a tough wicket. That helped me to attack, keep bowling on good areas and the wickets kept coming."
Vandersay recognised that he only got his chance because Wanindu Hasaranga was ruled out of the remaining two matches after he injured his hamstring in the opener.
"Wanindu Hasaranga is our number one spinner," said Vandersay who did his own cause no harm at all.
"I have understood that the selectors have a tough call to make. Whenever the opportunity comes I need to take it."
Rohit hit his second successive half-century but fell while attempting a reverse sweep.
Kamindu Mendis took a stunning catch at slip to help send back Gill off Vandersay.
Vandersay kept getting wickets including Virat Kohli trapped lbw for 14 and bowled KL Rahul for a duck as India slipped to 147-6.
Axar Patel attempted to put the chase back on track with his 44 and a 38-run partnership with Washington Sundar, who made 15, but Asalanka broke through.
Asalanka got the left-handed Patel caught and bowled and kept up the bowling charge to bowl out the opposition in 42.2 overs after a final run out.
'Disappointing': Rohit
"If you want to win games, we understand we have to play consistent cricket and we failed to do that today," said Rohit. "Disappointing, but these things happen."
Dunith Wellalage, who made 39, and fellow left-hander Kamindu, who hit 40, set up victory with their 72-run seventh-wicket stand after Sri Lanka slipped to 136-6.
Kamindu and Wellalage hit back to get Sri Lanka past 200 before Kuldeep broke through to get the left-handed Wellalage.
Kamindu kept up the charge in the final few overs to add more muscle to the total along with Akila Dananjaya, who hit 15.
He was run out on the penultimate ball of the innings by a direct hit from Shreyas Iyer, who was fielding at mid-wicket, while Kohli ran out Dananjaya.
Asalanka won the toss and elected to bat but the Indian bowlers took regular wickets, with Mohammed Siraj getting Nissanka caught behind on the first ball of the match.
Avishka Fernando made 40 and put on 74 for the second wicket with Kusal Mendis, who made 30. However, Sundar broke through to get Fernando caught and bowled and soon also sent back Kusal.
Sundar dismissed Asalanka for 25 and returned figures of 3-30.
The final match is on Wednesday at the same venue.