The home side endured a nervous final few minutes after Ashley Westwood's 87th-minute own goal but they held on to climb above Reading in the relegation dogfight.
A turgid opening 45 minutes offered little opportunity for either side although Andreas Weimann somehow missed an open goal for Villa in the opening minutes after West ham keeper Jussi Jaaskelainen had failed to gather Benteke's shot.
Benteke was the calmest person in the stadium as he rolled his spot kick into the net in the 74th minute after Mark Noble was adjudged to have fouled N'Zogbia.
Five minutes later N'Zogbia sent a sweetly-struck free kick curling past Jaaskelainen to give Villa breathing space.
Memories of Villa's recent failure to hang on to a 3-1 lead against Everton flooded back when the ball flicked off Westwood's head and looped over Brad Guzan.
West Ham piled forward in stoppage time and Guzan twice made important stops to preserve the three points for Villa.
Villa have 24 points from 26 games to sit just above the bottom three. Reading have 23, Wigan Athletic 21 and Queens Park Rangers prop up the table with 17.
Later on Sunday (1600 GMT), Manchester United have the chance to open up a 12-point lead over champions Manchester City at the top.
- Sports & Recreation