Opener Gambhir made 62 and skipper Dhoni an unbeaten 61 to help India achieve a 247-run target with 11 balls to spare for a 1-0 lead in the five-match series.
Gambhir set up the win with a 113-run stand for the second wicket with Suresh Raina (54) before Dhoni completed the job with his 26th half-century.
Rohit Sharma remained unbeaten with 25.
The Indian batsmen overshadowed opener Jayasuriya, who made a robust 107 to become the oldest batsman to smash a one-day century and the second to complete 13,000 runs.
Man-of-the-match Jayasuriya's 28th hundred came at the age of 39 years and 212 days, beating the previous oldest century-maker, Englishman Geoff Boycott at 39 years and 51 days (v Australia at Sydney in 1979).
Jayasuriya is now the world's second-highest scorer with 13,070 runs after India's Sachin Tendulkar (16,427).
India began the chase on a shaky note as they lost Tendulkar (five) in the fourth over and then saw Gambhir and Raina survive some anxious moments ear