Bangladesh started briskly but lost wickets to reach 158-4 when bad light stopped play on day three, with the visitors still needing 357 for a win.
India earlier declared their second innings on 287-4.
Pant, who made 109, and Gill, unbeaten on 119, put on 167 runs for the fourth wicket to ram home India’s advantage in the second session after they bundled out Bangladesh for 149 on day two.
Bangladesh skipper Najmul Hossain Shanto was unbeaten on 51 at the close of play, with Shakib Al Hasan on five.
India was hitting Bangladesh with some “quality bowling”, Bangladesh batting coach David Hemp told reporters.
“Very confident side, especially at home, so you are going to be challenged,” he said.
“So it’s a case of how do we match that. You have to look to score and that’s what we just reinforce… to the batting group, to trust their strengths.”
India spinner Ravichandran Ashwin took three wickets to add to his 113 with the bat in his team’s first innings total of 376.
Bangladesh openers Zakir Hasan and Shadman Islam began briskly with 62 runs for the first wicket before Jasprit Bumrah ended their defiant stand to send back Zakir for 33.
Ashwin dismissed Shadman for 35
The veteran off-spinner kept up the charge when he bowled left-handed Mominul Haque for 13 with a flighted delivery that also turned. He then had Mushfiqur Rahim caught out, also for 13.
Najmul stood firm to reach his fifty and, with fellow left-hander Shakib for company, the two saw off the day in fading light.
The left-handed wicketkeeper-batsman Pant earlier smashed the Bangladesh bowlers to all parts of the ground before a double off Shakib gave him his sixth Test century.
The 26-year-old, who survived a near-fatal car crash in December 2022, took off his helmet and raised his bat to acknowledge a standing ovation from the weekend crowd.
Pant fell caught and bowled by spinner Mehidy Hasan Miraz after his 128-ball knock that included 13 fours and four sixes.
Gill kept up the charge and raised his fifth Test ton before skipper Rohit Sharma called him and KL Rahul, on 22, back.