Hereford suffered their worst home loss since returning to the Football League.
Gillingham stunned the Bulls with two in five minutes, Frank Nouble firing home before Garry Richards' close-range header.
Two more came either side of half-time through Joe Heath's own goal and Danny Jackman's 25-yard strike.
Rob Purdie missed a penalty for the Bulls before Chris Whelpdale and Stefan Payne made it six, Sam Winnall pulling back a late Hereford consolation.
It was the Bulls' worst battering since losing 6-1 at Bristol Rovers in August 2008, their second season back in the Football League after a 10-year absence - but their last five-goal home defeat was by Chester back in November 1993.
VIEWS FROM THE DRESSING ROOM
Hereford manager Jamie Pitman told BBC Hereford and Worcester:
"One thing I am not is a quitter - I won't quit but if that is what they (the directors) decide then that is up to them.
"If they think that is the best for the football club than that is fine, I will accept that decision.
"But I am not going to give in - you should know that as I wasn't a quitter as a player and I am not as a person, so it is up to them to decide that as it is out of my hands."
Gillingham boss Andy Hessenthaler told BBC Radio Kent:
"Being a manager and knowing Jamie (Pitman) as I do, he's a hard worker and it's a tough day for them.
"On my own team's performance, I thought we were terrific today. We took our goals well.
"We needed a win and we got it. It's great that we scored the goals and the performance was good.
"It was a workman-like performance. We were strong and we took our chances."