Grigg kept his cool to slot home the winner on the stroke of half-time to make it eight wins from nine games for the promotion-chasing Bees.
The Magpies, still looking for their first victory under new boss Shaun Derry, did not look like a team bottom of the league, though, as they dominated the game.
Brentford goalkeeper David Button was forced into action early on making a double save to deny Jack Grealish and Danny Haynes, while Callum McGregor had an effort cleared off the line by Clayton Donaldson.
But the hosts fell behind in the 44th minute as the Bees netted with their first effort of the game. Toumani Diagouraga’s perfectly-weighted throughball found Grigg and he slotted home.
Derry’s men continued to impress in the second half but Brentford should have sealed the game on the hour mark as Donaldson burst clear, only to scuff his effort wide of the post.