Garner, in his third appearance after being out for 17 months with a broken leg, struck in the dying seconds with a spectacular 30-yard shot.
It made up for a late miss by Alan Lee who drilled wide with only the keeper to beat with just seven minutes to go after giving his side the equaliser from the penalty spot.
Rotherham were fortunate to be level at half time thanks to the Lee penalty after Craig Armstrong had given Wednesday the lead.
Wednesday looked sharp after their dismal start to the season and youngster Leon Knight on his home debut almost broke the deadlock with an early effort.
And a sweeping move after eight minutes put Wednesday in front. Gerald Sibon found Shefki Kuqi on the right with a crisp pass and the Finnish international's low cross was met by Armstrong whose curling shot from 12 yards beat Mike Pollitt.
Wednesday came close to stretching their lead but Knight, on loan for the season from Chelsea, hit his shot at the keeper and then saw Pollitt make a stunning save from his spectacular overhead kick.
And when Sibon's pass sent Knight clear he hoisted his shot over the top when Pollitt raced out to challenge.
But Rotherham were level after 30 minutes when Lee scored from the spot after John Mullin was brought down in the area after a weaving run.
A superb Pollitt save denied Sibon after the Dutchman's free kick was blocked and just before the break Sibon's deft touch steered the ball across the face of goal.
Rotherham bounced back after the break and Kevin Pressman had to save from Chris Sedgwick.
A shot from Stuart Talbot was high and then Pressman made a stunning one-handed stop diving low to his right after Martin McIntosh produced a power header from Paul Hurst's quickly taken free kick.
And Pressman had to be at his best again when Lee produced a late goalbound header but then seven minutes from the end Lee blazed wide after Darren Byfield set him up.
But Garner made no mistake in the last minute after another set up by Byfield