India replied with a 375-run first innings to Sri Lanka's 183 runs.
Sri Lanka responded with 367 runs in the second innings.
India's luck seemed to take a turn for the worse as Sri Lanka's Rangana Herath stepped in before taking a haul of 07 wickets for just 48 runs.
He and Tharindu Kaushal (3-47) led the home side to a sensational win against the visitors.
Herath went past Bishan Bedi to become the third-most successful left-arm spinner in Test history, and registered the second-best figures in Galle.
Sri Lanka is currently leading the tournament as 1-0.