Sri Lanka were in deep trouble at 94-7 chasing a 238-run target but Jayawardene gave a scare or two to India, adding 81 for the eighth wicket with Thilan Thushara.
Jayawardene was the ninth man out after hitting one six and six fours in his 111-ball knock as Sri Lanka were bowled out for 204 under lights.
The home side now trail 2-1 in the five-match series.
"It's always better to win through collective effort and it shows that we are not relying on any individual," said India captain Mahendra Singh Dhoni.
"There are two more matches to go and we will play to win."
The stiff resistance from the Sri Lankan skipper and Thushara came after fast bowlers Zaheer Khan (3-23) and Praveen Kumar (2-62) threatened to lead India to an easy victory.
But despite their efforts, the asking rate kept climbing and Zaheer eventually broke the stubborn stand when he bowled Thushara, who was dropped twice.
Sri Lanka's bid to attack the new-ball bowlers from the beginning of their innings backfired, with Sanath Jayasuriya (13), Kumar Sangakkara (nine) and Chamara Kapugedera (12) all falling cheaply.
Jayasuriya smashed three fours off Kumar before he was dismissed in the bowler's third over, edging an away-going delivery to wicketkeeper Dhoni while attempting to cut.
Sangakkara was trapped leg-before by Zaheer immediately after cutting the bowler for a four, while Kapugedera was dismissed after lofting Kumar over midwicket for a six.
India threatened to reduce the match to a no-contest when Zaheer trapped Chamara Silva leg-before to leave the hosts reeling at 40-4 in the 10th over, but Jayawardene received valuable support from Thushara.
"I don't think we deserved to win. We made too many mistakes with the bat," said Jayawardene.
"We knew we had to negotiate the first 15 overs, but we lost four quick wickets and it was an uphill task from there."
India earlier had impressive batting efforts from Dhoni (76) and Suresh Raina (53) to thank for their 237 total after struggling at 91-4.
Dhoni put on 54 for the fifth wicket with Raina and 67 for the next with Rohit Sharma (32).
The Indian captain stepped up the run-rate with bold hitting in the closing 10 overs, which yielded 70 runs. He hit eight fours in his 23rd half-century.
Unorthodox spinner Ajantha Mendis finished with 3-56, including the wickets of Harbhajan Singh and Dhoni off successive balls in his last over. Seamers Nuwan Kulasekara and Thushara each took two wickets.
A pair of run-outs at crucial stages affected India's chances of posting a big total after they elected to bat on a slow pitch.