After Ryan Miller turned aside Adam Henrique, Gerbe used a quick forehand snap shot to beat Brodeur and enable Buffalo to end its franchise-worst road skid.
Jordan Leopold scored in regulation and Miller finished with 27 saves.
Patrik Elias managed the only score for New Jersey, which dropped a third straight going into the All-Star Game break.
Brodeur made 13 stops for the Devils.
Jordana Brewster on Paul Walker: 'He was an enormous presence in my life'
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need