Klaasen slammed seven sixes in hitting 69 off 30 balls as South Africa chased down a target of 189 with eight balls to spare.
The win squared the three-match series, taking it to a decider in Cape Town on Saturday.
Both teams had to contend with a wet ball, with drizzle falling during both innings.
“Klaasie got us ahead of the game,” said South African captain JP Duminy.
The wicketkeeper-batsman, who only got his international debut after Quinton de Kock was injured during the second of six one-day internationals, was moved up the batting order when it seemed possible rain would cause the match to be decided on a Duckworth/Lewis/Stern calculation.
“We weren’t sure whether we would be coming off,” said Duminy. “In the end it worked in our favour.”
Klaasen, who was man of the match when South Africa gained their only win in the one-day series, opened his score with two sixes and didn’t look back.
Duminy played an anchor role before finishing the match with two sixes in an innings of 64 not out off 40 balls.
“It was a tough one for the bowlers,” said India captain Virat Kohli, who said he had no complaints about the umpires keeping the players on the field.
“It was good from a spectator point of view. Once the game continued in the first innings we knew it would continue throughout. It was constant drizzle, it wasn’t too drastic, so it was fine to play on.”
Kohli praised Manish Pandey and MS Dhoni, who hit 79 not out and 52 not out respectively in an unbeaten fifth wicket stand of 98 off 56 balls to get India to 188 for four after they had been struggling at 45 for three.
“I thought it was a winning total but you can’t control what happens with the weather,” said Kohli.
“You have to give credit to the South African batsmen. They were positive and took calculated risks.”
India paid the penalty for a lack of bowling options. Leg-spinner Yuzvendra Chahal struggled to control the wet ball and was hit for 64 runs in four overs.
Pandey made his career-best 79 not out off 48 balls while Dhoni thrashed his 52 off 28 balls.
Pandey came to the wicket after a rare failure by Kohli, who was caught behind for one off fast bowler Junior Dala.