In an otherwise forgettable World Cup for India, the left-arm spinner provided the sole bright spark.
Gandhe had tried to rule a waist-high full toss as no ball by RR all-rounder Ben Stokes.
Dhoni has been rested for the last two games of the series which is tied at 2-2, going into the decider here on Wednesday.
Kohli played a pivotal role with a responsible knock of 82 not out, lifting India from a double blow at the beginning of their innings to 172 for three in the company of Rahane.
Bishan Singh Bedi lauded Ravichandran Ashwin, who picked up his 500th first-class wicket against West Indies in Hyderabad.
The embattled Steve Smith and his deputy David Warner stood down as captain and vice-captain respectively for rest of Australia's third Test match against South Africa.