Charlie Lee, who struck seven minutes after coming off the bench, sealed the win for Taylor's side with two minutes to go.
It was a crucial win for the Gills after a run of three successive defeats and opened up a six-point gap between themselves and the relegation places.
But Taylor said he had no idea which side would eventually come out on top in an end-to-end encounter.
"I didn't know what was going to happen next. I didn't have a clue," he said.
"Every time they attacked I wanted our players to get that first touch. Every time we attacked, I wanted it to fall to our best finisher.
"The reason why I sent Charlie Lee on was because of the urgency of his long throw.
"I thought that could be the last roll of the dice. I thought it could make them nervous. In the end he was involved with the goal. He did well to keep it down.
"We'd lost three on the spin, which made it very important and that's also where players can get edgy and nervous.
"But we showed character, although we didn't show enough quality and we defended too much because we didn't ask enough questions of them.
"There will be a lot of teams at all levels who had to grind out a result like us."