ROTHERHAM gave a disjointed display and failed to make it six home league wins in succession as they fell to the struggling Gills at the New York Stadium.
They conceded in the third minute of each half to Josh Parker and Tom Eaves, who had not scored in an eight-match spell with the Millers four years ago.
Kieffer Moore replied with his 12th goal of the campaign but the Millers had full-back Joe Mattock sent off for two yellow cards in succession in the 85th minute - the first for a foul on Scott Wagstaff and the second for dissent over the decision.
Gills immediately attacked and Parker headed home their third in the 87th minute.
Rotherham boss Paul Warne was frustrated by his side's lacklustre performance.
He said: "The fans, the players and staff turned up with high expectations of coming away with points.
"We knew what to expect from them. I asked the lads to start fast but regrettably, we conceded so early because of an individual error - someone not picking his man up - which is a worry.
"It took the team a long time to get going. There wasn't enough positivity on the ball and there wasn't that spark that we've had this season.
"My emotion is of huge disappointment."
Central defender Richard Wood returned to the Millers side as captain after being rested and Darren Potter recovered from the heel injury which had forced him to miss the previous three games to take his place in front of the defence. Facing them was Owls loanee Sean Clare.
The Millers went behind in the third minute after Marek Rodak punched a bouncing cross for a corner and then failed to connect with the deep delivery from Billy Bingham, allowing Parker to head home from around 10 yards out.
Only a sliding challenge from Michael Ihiekwe denied Eaves the chance to put the Gills 2-0 ahead before a stinging drive from Joe Newell was gathered at the second attempt by Tomas Holy at the other end.
The Gills goalkeeper also kept out a 20-yard effort from Shaun Cummings but was generally well protected, though Kieffer Moore headed over from six yards out.
Connor Ogilivie replaced fellow defender Bradley Garmston at the break for the visitors, who soon made it 2-0 as Eaves met Jake Hessenthaller's cross to score with a diving header from 10 yards.
Anthony Forde and Richie Towell were replaced by Jon Taylor and David Ball as the hosts attempted to recover.
They made it 2-1 as Moore held off Gabriel Zakuani to fire the ball under Holy to make it 2-1 in the 58th minute after latching on to a long ball from Potter.
Taylor then chested the ball inside before letting fly and Holy did well to push it aside for a corner at the foot of the post.
Gills lost Zakuani to a twisted ankle with Luke O'Neill coming on.
Mattock's dismissal was followed by the Gills pair of Bingham and the unmarked Parker combining again from a corner to seal victory for the visitors.