Leg-spinner Akila Dananjaya returned career-best figures of 6-54 to make India stutter at 131-7 while chasing a Duckworth-Lewis revised target of 231 in 47 overs in Pallekele.
Dhoni, who scored 45, then put on an unbeaten 100-run stand with Kumar, who made 53, to steer the team home in 44.2 overs and take a 2-0 lead in the five-match series.
We’ll come out strong and beat India, says Sri Lanka's Tharanga
"Quite an exciting game of cricket... Something that gave us a tough test but good to come through eventually," India skipper Virat Kohli said at the presentation. "Quite magnificent to see two 100-run partnerships in a chase of 230 (231) and a collapse in between — seven wickets down. You don't quite see that in this game too often.”
India lost seven wickets for 22 runs after a 109-run opening partnership between Rohit Sharma and in-form Shikhar Dhawan.
Man of the match Dananjaya, who was one of the three changes in the team's starting line-up, drew first blood after trapping Sharma lbw for 54.
Dhawan, who hit a match-winning 132 in the opening ODI in Dambulla, soon joined his partner in the pavilion after falling to left-arm spinner Milinda Siriwardana for 49.
The left-handed batsman was done in by a superb catch by former captain Angelo Mathews at short-fine leg.
The 23-year-old Dananjaya then turned on the heat against the number-three ODI side with his googly.
He got Kedar Jadhav, Kohli and Lokesh Rahul bowled in his fourth over to take some steam out of the Indian chase.
Sri Lanka has 'too many cooks', admits Pothas
"What we knew of him was more of an off-spinner bowling the odd leg-break, but he picks up four wickets on googlys. It's difficult when you haven't seen the guy at all," said Kohli. "Now we are more wary...but credit to him he capitalised on the bit of hesitation we had out there in the middle.”
Dananjaya, who made his ODI debut against New Zealand at Hambantota in 2012, was on song as he kept making inroads with the wickets of Hardik Pandya, who injured his hamstring while bowling, and Axar Patel.
But ice cool Dhoni kept the chase on track with the gutsy Kumar, who had gone wicketless during his spell as the team's pace spearhead.
While Dhoni kept picking the singles and twos, Kumar was happy playing second fiddle before unleashing his power and register his maiden ODI fifty.
"Disappointed, we came really close and we couldn't finish it," Sri Lanka skipper Upul Tharanga said after the loss. "Once they needed 100 runs, we tried everything. Dhoni and Bhuvneshwar batted sensibly. Unlucky we didn't get that wicket.”
The third match is scheduled for Sunday at the same venue.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ