Rotherham boss Steve Evans described the Cheltenham match as a rollercoaster ride after five goals in the first 31 minutes.
Daniel Nardiello's double and a goal for Ben Pringle had his side 3-2 up with just over half an hour on the clock before man of the match Lee Frecklington finally settled the goal-fest with Rotherham's fourth in added time.
Evans said: "We have a habit of making things difficult for ourselves and after going a goal down so quickly we showed some character.
"It was a big performance. We played some special stuff in periods. It was a pity we had to wait so long for the fourth goal because I think our performance deserved a more comfortable win.
"When I joined this football club I said it was going to be a roller coaster ride, but I didn't realise it would be 3,000 feet high.
"We said to the boys we were going to play with pride and passion, but what a response we gave the supporters and what a response they gave us back. We were a goal down after 50 seconds, and I said to my staff on the bench, listen to the supporters, and that was for them."