Kohli savaged the Australian bowlers, particularly Mitchell Johnson, for his third ton of the series, while Rahane hit his highest Test score of 147.
The pair piled on 262 runs for the fourth wicket, a record for the fourth wicket by any pair at the MCG. It eclipsed Michael Clarke and Shane Watson’s 194 against Sri Lanka two years ago.
Kohli was out in the last over of the day, brilliantly snapped up by Brad Haddin off Johnson for 169 in 380 minutes off 272 balls with 18 fours.
At the close India were 462 for eight, trailing by 68 runs with two days remaining. Mohammed Shami was nine not out.
“I’m very proud of the way we played. We backed ourselves throughout. I’m not disappointed at all (at getting out in the last over),” Kohli said.
Australia paceman Ryan Harris said early wickets on Monday’s fourth day would be crucial.
“Now that we’ve got eight wickets down the quicker we get them in the morning the better, and hopefully have a bit of lead and bat and see where we go from there,” he said.
The last time India put on a 250-plus stand in an overseas Test was the 353 by Sachin Tendulkar and V.V.S. Laxman for the fourth wicket in Sydney in 2004.
Rahane was finally out leg before wicket to Nathan Lyon for 147 in the 108th over. He batted for four hours and faced 171 balls with 21 fours.
The pair were particularly severe on Johnson, with Kohli crunching three fours off one over and Rahane repeating the dose in Johnson’s subsequent over.
The last time Johnson (1-133) had been punished as severely was 0-104 against England at the Gabba in 2010.
Rahane raised his highest Test score with a cross-bat four off Johnson, bettering his 118 against New Zealand in Wellington in February.
Their running between the wickets was impressive as was their array and placement of shots to neuter the Australian attack.
India’s cause was aided by a poor day in the field for Australia, with three dropped catches.
Lyon bungled a regulation two-handed head-high chance off his own bowling when Rahane was on 70 and Watson put down Kohli (88) at first slip off Johnson.
Substitute fielder Peter Siddle made it three with a dropped two-handed chance off Lokesh Rahul. But the debutant was out off Lyon’s next ball, caught by Josh Hazlewood for three.
“I don’t remember the last time I’ve seen them be inconsistent in the field. They have very high standards with slip catching and ground fielding,” Kohli said. “It might just be one of those off days.”
The ragged Australian fielding was in contrast to the morning session when Brad Haddin took a stunning catch to dismiss Cheteshwar Pujara off the second ball of the day.
The veteran wicketkeeper, who missed a far easier chance off Pujara late on Saturday, pulled off one of the catches of the series, flinging himself to his right to take a spectacular acrobatic catch as the batsman failed to add to his overnight 25.
Skipper M.S. Dhoni was out late in the day, caught behind off Harris for 11, and the lion-hearted Harris took a tumbling caught and bowled to dismiss Ravi Ashwin for a duck.
There was a chilling moment as Murali Vijay on 63 turned his head to avoid a searing Johnson bouncer and took a blow on the side of his helmet early in the day.
It was eerily reminiscent of the blow Australian batsman Phillip Hughes took when he was fatally struck by a similar delivery in a domestic game last month.
Vijay batted on but was out five runs later when he was caught by Shaun Marsh at first slip off Watson.
Johnson was also involved in a flash point when he hurled the ball back at Kohli, striking the batsman on his back. Kohli collapsed to the ground.
Johnson quickly apologised but the mood soured, with the umpires intervening to ease tensions between the two.
India, trailing 2-0, are striving to win the Melbourne Test to stay alive in the four-match Border-Gavaskar Trophy series. But they have not won at the MCG for 33 years. (AFP)