The Shakers looked set for a third straight defeat after early goals by David Ball and Rotherham captain Lee Frecklington.
Will Vaulks then fired home after 83 minutes to make it 10 points from 12 for the Millers, who are now two points outside the play-off places.
The visitors went in front after five minutes as Tom Aldred cleared Ryan Williams’ cut-back as far as Ball, who curled inside the far post from 12 yards.
Bury replied with Nicky Ajose flashing a low shot across goal but the Millers doubled their lead after 10 minutes.
Anthony Forde’s corner found Frecklington in the centre of the box and the Rotherham midfielder powered a free header inside the far post.
Williams’ low strike was then turned wide by Leo Fasan, while Jay O’Shea and Danny Mayor fired wide as Bury improved slightly after the break.
But centre-half Vaulks fired in a superb strike from the corner of the box as the Millers went four unbeaten for the first time this season.
New first-team coach Kieran McKenna will look to take some of Manchester United's brightest talents on the tour to America in July.
Manuel Pellegrini has complete faith West Ham's record signing Issa Diop has the attributes to make a big impact in the Premier League.
David Silva's vow to continue playing international football beyond the World Cup has the full support of Man City boss Pep Guardiola.