The Devils were trailing 3-2 late in the third period when Boston's Torey Krug was handed a 4-minute double-minor penalty for high-sticking.
The Bruins' woes were compounded with 2:49 remaining when Patrice Bergeron was cited for delay of game after sending a puck over the glass, giving New Jersey a two-man advantage.
Zidlicky struck for the equalizer with 1:08 remaining, and with the Devils still on a power play, Damien Brunner partially fanned on a shot but the puck dribbled to an unchecked Greene, who fired it home for the game-winner.
Brunner also scored in the second and Adam Henrique had a goal for New Jersey, which notched just its second win of the season.
Martin Brodeur made 25 saves.
Tuukka Rask turned aside 28-of-32 shots for Boston.