Kieron Morris forced Daniel Iversen into the first save of the game after he darted down the right wing and fired in a low shot.
Wiles almost caught Tranmere out as his scuffed shot struck the post before bouncing to safety.
The visitors applied early pressure in the second half with Paul Mullin forcing Iversen into action with a shot from the edge of the box.
Rotherham substitute Chiedozie Ogbene almost set up the opener as his left-wing cross was fired over by Matt Crooks.
Wiles put Rotherham in front in the 73rd minute with a high finish beyond Scott Davies.
Tranmere pushed for a leveller and it finally came in the fifth minute of added time as Payne was on hand to poke in from close range.