Westwood levelled before Simon Walton capped a thrilling comeback after 69 minutes. But Northampton, who suffered their first away defeat since November, were denied an equaliser when referee Peter Quinn said Gilligan's late header had not crossed the line.
"We've had a bit of luck but I'm not going to feel guilty as we deserve some," said Gradi.
"I couldn't see it properly from my angle but if you ask me then it was definitely not over the line! It was a terrific victory but I couldn't see it coming at one point."