Ballance was unbeaten on 104 at the close and beleaguered captain Cook survived a dropped catch to silence his critics with a battling knock after making a brave decision to bat first.
Ian Bell (16 not out) and Ballance safely negotiated the second new ball and the pair will resume on Monday when England will bid to post a large total as they bid to level the five-match series.
Cook, in dreadful recent form which has led to calls from former England captains Michael Vaughan, Geoff Boycott, Mike Atherton and Kevin Pietersen to step down, had a huge slice of luck on 15 when he was dropped by Ravindra Jadeja at slip.
He survived to add 158 with Ballance, who joined an elite group of players by scoring his third century in his first six tests.
Cook batted with few alarms and was looking good for his 26th test century when he feathered a faint edge down the leg side off Jadeja and was caught by wicketkeeper Mahendra Singh Dhoni.
“The reception was like nothing I’ve ever experienced. It was a really nice feeling,” Cook said.
“I was delighted to get 95 but also frustrated that I didn’t get a hundred but if you’d have offered me that score yesterday I’d have snapped your hand off.
“It has given me some confidence that my batting is going in the right direction and hopefully I can carry on scoring runs.”
Cook did, however, reach a significant personal landmark as he overtook David Gower to move into third place in the list of England’s all-time leading test run-scorers, on 8,257. Graham Gooch leads the list with 8,900 from Alec Stewart on 8,463.
“They’re really nice achievements aren’t they but at the beginning of the day I wasn’t thinking about it at all,” Cook said.
Cook made the brave call to bat after winning the toss and despite a hint of movement for the seamers, the hosts lost only Sam Robson for 26 in the morning, caught at third slip off Mohammed Shami.
The afternoon session belonged to England, although India’s Bhuvneshwar Kumar and debutant Pankaj Singh began to find their length with much greater consistency.
Ballance survived a close caught behind call and several deliveries whistled just past the outside edge before he and Cook reached tea with an unbroken partnership of 131.
Cook looked nervous in the nineties and he perished trying to pull a short leg-side delivery from Jadeja which he nicked through to Dhoni.
Ballance had upped the scoring rate and reached his century, which included 15 fours, with a perfectly-timed boundary.
He was well supported by Bell, although the experienced right-hander was fortunate to survive following a close lbw shout off Singh.
“Today the scoreboard says it’s not our day and it wasn’t the best day on tour for our bowling attack but Pankaj bowled pretty well and if things went his way he would have had a couple of wickets,” India bowling coach Joe Dawes said.
“There’s improvement to make tomorrow and hopefully we can get an early breakthrough.
“If we can get two or three poles in the morning we’ll be well back in it. We need to make them play a little bit more.”
(Editing by Ed Osmond)