The paceman finished with 5-61, his second five-wicket haul in one-dayers, as India bowled Sri Lanka out for 274 after scoring a challenging 294-7 in the day-night match.
Sri Lanka were struggling at 102-5 before Lahiru Thirimanne (77) and Jeevan Mendis (72) gave India some anxious moments with a 102-run stand for the sixth wicket.
Thirimanne hit three sixes and five fours in his career-best knock before he was run out, and then man-of-the-match Pathan removed Thisara Perera (18) and well-set Mendis in the same over.
Mendis cracked six fours in his maiden half-century in one-day internationals.
"This was a very good wicket to bat on. Gautam batted well and we had a very good platform," Dhoni said. "We still need to improve, not only in bowling but also in batting."
India were under pressure at 87-3 but Gambhir and Tiwary propped up the innings with a 110-run stand for the fourth wicket.
Sri Lanka and India will now clash in a one-off Twenty20 international at the same venue on Tuesday.
Follow us @SprtNationalUAE