Derby, who were knocked out of the FA Cup by Reading at the weekend, would have moved two points clear of Bournemouth and Middlesbrough at the summit with a win in South Yorkshire, but they found themselves 3-1 down after 60 minutes thanks to quickfire second-half goals from Richie Smallwood and Matt Derbyshire.
But there was an air of inevitably about the comeback as soon as Tom Ince grabbed his second goal of the game, and Derby’s dominance eventually paid off with seven minutes remaining as Bent continued his hot-streak by poking home his sixth goal in six games.
It was harsh on Rotherham, who initially led in the first half through Paul Green’s opener, and were good value for the potential upset. The fact they are the first team to score three against Steve McClaren’s men since August will be little consolation in their battle against relegation.
The Rams started as heavy favourites, but it never looked that way as the Millers more than held their own in the opening 20 minutes.
However, having seen off that early bluster, the Rams began to take control and they were within inches of taking the lead when Bent’s shot was scrambled clear by goalkeeper Adam Collin, with Green hacking the loose ball away on the line.
Jamie Ward then had two chances to open the scoring in the space of 60 seconds, but first he shot straight at Collin and then drifted an effort wide with plenty to aim for at the far post.
In the build-up to the second Ward chance, Millers’ defender Jack Hunt suffered a serious-looking injury, with play held up for six minutes.
That actually helped the hosts regroup and they forced their way into a 35th-minute lead through former Rams midfielder Green, who tapped in from close range.
But the Millers fans had barely taken their seats by the time a moment of magic from Ince wiped out their lead.
Ince picked up the ball on the right, twisted and turned and then sent a sumptuous effort sailing into the top corner with Collin helpless.
The Millers needed a bit of luck to get to the interval on level terms as Ince flashed another effort wide and they made that count with a two-goal salvo within nine minutes of the restart.
First Smallwood bagged his first goal for the club in the 49th minute when he delivered a free-kick in from the left, which evaded everyone and sailed into the top corner.
New York Stadium was bouncing and five minutes later the hosts grabbed a vital two-goal cushion after Derbyshire fired low under Grant after a defensive error by Omar Mascarell for his fourth goal in five games.
What turned out to be the vital moment of the match came just after the hour.
With the Millers looking rampant, Grant was forced into a spectacular save to tip Derbyshire’s fierce drive over and from the resulting corner the Rams broke and reduced their deficit.
They worked the ball over to the right and Craig Forsyth sent in a cross which Ince turned in at the near post.
That set the final 30 minutes up for a Derby onslaught and it came, with the Millers barely able to get out of their own half.
Eventually the pressure told in the 83rd minute as Jesse Lingard broke down the left and centred for Bent, who nipped in to turn the ball home.
Rotherham had a chance to restore their lead at the death but Derbyshire put his header over the bar and it ended all-square.