Jo Kuffour scored twice as Gillingham held off a spirited Torquay comeback.
On-loan Bristol Rovers striker Kuffour swept in two strikes from close range to give the visitors a 2-0 lead.
Torquay fought back to 2-2 after the break thanks to Chris Robertson's header and Danny Stevens' angled drive.
Luke Rooney restored the lead from the penalty spot after Kuffour was fouled by Eunan O'Kane, before an angled drive from Frank Nouble and a Chris Whelpdale cross-shot sealed victory.
VIEWS FROM THE DRESSING ROOM
Torquay boss Martin Ling told BBC Radio Devon:
"You talk at half time and tell them all the positives and they go out there for eight minutes and really put a spurt on, get the two goals, get themselves back into it, and then the penalty's the swinging incident, but defensively today we were very, very poor.
"On chances their goalkeeper has had to work harder than our goalkeeper, but they took their chances and we've missed ours.
"It's poor defending, I thought Nouble and Kuffour gave our two centre halves a torrid time all afternoon and made it very difficult for us."
Gillingham boss Andy Hessenthaler told BBC Radio Kent:
"That was good to watch as a spectator but a nightmare for us to watch on the bench.
"We got a couple of goals first half, perhaps fortuitous, we said at half-time 2-0 is a dangerous scoreline and if we concede early we've got a problem and that's what happened.
"At 2-2 I could only see one winner and it wasn't us, but we were comfortable in the end, but we defend too deep and we are our own worst enemies at times."