The Poppies fell behind early on to lowly Dorchester Town but, after the visitors had been reduced to 10 men, fought back to lead at half-time thanks to goals from Brett Solkhon and Aaron O’Connor.
However, the Magpies stunned the hosts in the second half as, despite the numerical disadvantage, they came back to take a 3-2 lead.
But Kettering mounted a late fightback and two more goals from O’Connor, who now has 32 in all competitions this season, sealed a 4-3 victory.
The Poppies remain in fourth place in the Evo-Stik South League Premier.
And Law admitted they have some work to do on their defence ahead of a crucial Easter weekend, which sees them play fellow promotion contenders Weymouth and King’s Lynn Town.
“It was probably one of the few games this season where we have come out and won and we didn’t deserve to,” the Poppies boss said.
“Certainly from a defensive point of view, we didn’t deserve anything but we have managed to score another four goals and that has saved us.
“We got out of jail, there’s no question about that, but at the same time we have forced their goalkeeper to make four or five outstanding saves as well as scoring the goals we did.
“Dorchester belied their poor away record and their league position and played very well, especially being down to 10 men.
“But we have some defensive issues that we really must look at before the weekend.”