And in the 64th minute Fox stepped up to curl a delightful free-kick over the wall and inside Romain Larrieu's far corner.
In a frantic match, Gillingham were first to settle and, after an early spell of pressure, took the lead with a splendid move.
Diminutive striker Dean McDonald released Gary Mulligan down the left and, after cutting inside, he unleashed a shot that deflected back on to the head of McDonald who nodded home from three yards out.
But if that goal had an air of quality about it, Blackpool's equaliser owed to some calamitous Gillingham defending.
After Andy Morrell's looping header bounced off Larrieu's crossbar, Brent Sancho hacked a clearance into the path of Ben Burgess, who gleefully smashed the ball back past the keeper.
The same combination of Burgess and Morrell almost handed the Seasiders the lead in the 28th minute, but Morrell rolled his shot narrowly wide from the edge of the box after Burgess' neat lay-off.
But in the 34th minute Gillingham were back in front when Nicky Southall delivered a precise corner onto the head of Andrew Crofts, who planted a firm header past Rachubka from close range.
Five minutes later Danny Spiller went down under Michael Jackson's clumsy challenge but Rachubka guessed correctly to deny Flynn from the spot and keep his side in the hunt.
And in the 64th minute Blackpool punished that miss when Fox bent a vicious free-kick over the wall and inside Larrieu's far post.
With both teams needing a victory for different reasons, the final 20 minutes produced plenty of attacking adventure but few chances.
Rachubka had to be alert to tip the ball over his bar after Mark Bentley's cross appeared to be heading in, before Gillingham had strong claims for a penalty turned down in the final minute when Spiller appeared to be tripped by Ian Evatt.