Root smashed 11 fours and a six during his 124-run knock before being caught and bowled by Umesh Yadav.
The 25-year-old right-hander put on 179 runs with Ali (99 not out) after India's spinners had reduced England to 102-3 on a placid track at the Saurashtra Cricket Association ground in Rajkot.
At stumps, Ali was just one run shy of his fourth Test century and Ben Stokes was on 19.
Root smashed 11 fours and a six during his 124-run knock before being caught and bowled by Umesh Yadav, who almost lost the chance as he rushed to celebrate the dismissal.
With Ali standing tall at one end, England looked set for a big first innings total, vindicating captain Alastair Cook's call to bat first on winning the toss.
Root celebrated his 11th Test ton, and third against India, by waving his bat towards a grateful England dressing room.
In completing the feat, Root became the first overseas player to score a century in India since Australia's Michael Clarke in 2013.
Ali put in a focused performance, negotiating 192 balls during his 243-minute stay at the crease.
Root and Ali piled on the misery for India who were also set back by an injury to pace spearhead Mohammed Shami.
Earlier, a gripping opening session saw Haseeb Hameed, 19, become the youngest player to open the batting for England on debut.
The youngster, dubbed "Baby Boycott" for his unflappable style, made 31 during his 98 minutes at the crease before falling lbw to world top-ranked spinner Ravichandran Ashwin (2-108).
Ashwin also dismissed Ben Duckett for 13 but remained wicketless in the last two sessions.
Hameed and Cook (21) both benefited from the largesse of India's fielders, who dropped some early chances.
Cook was dropped off Shami on the third ball of the innings while Hameed got a reprieve on 13 when Murali Vijay grassed his catch at first slip.
The England skipper, who surpassed Michael Atherton's record of 54 Tests as England captain, was adjudged leg before off left-arm spinner Ravindra Jadeja.
TV replays showed the ball would have missed the leg stump but Cook did not refer to the third umpire even though the decision review system is being used for the first time by India in a home series.
Hameed showed little sign of nerves against top-ranked India, twice hitting Shami for boundaries in an over and driving Ashwin for an elegant four in the covers.