Defender Marcel Halstenberg drilled the ball in three minutes after the restart following a lacklustre first half by the Germans, who lost 4-2 at home to the Dutch on Friday.
Serge Gnabry continued his impressive scoring run for Germany, netting in second-half stoppage time for his ninth goal in his 10th international, completing Germany’s eighth consecutive win over Northern Ireland.
The win put Germany on 12 points from five games, ahead on goal difference of second-placed Northern Ireland, who suffered their first loss of the campaign as captain Steven Davis became their most capped outfield player with 113 appearances.
The third-placed Netherlands, 4-0 winners away to Estonia on Monday, are on nine points from four matches.
“We were under pressure to win after Friday’s result and we had to overcome some obstacles in the first half,” Germany coach Joachim Loew told reporters. “The Northern Irish attacked early and disrupted our game. After the break we did it better.”
The Germans, missing half a dozen injured players, seemed to lack a clear game plan in the first half with plenty of passing but struggling to find ways to open up the Irish defence.
Loew’s young team, looking to recover from last year’s shock first-round World Cup exit and Nations League relegation, have not had enough match practice and it showed.
“We had never played before with this line-up,” Loew said. “So we will need some patience because this a learning process.”
Conor Washington had a golden chance to put the hosts ahead in the seventh minute when he pounced on a rare Toni Kroos mistake but fired straight at charging goalkeeper Manuel Neuer.
Timo Werner had the visitors’ best chance before the break but his close-range effort was saved by Bailey Peacock-Farrell.
Germany looked to be feeling the effects of Friday’s loss with the Irish working hard to stifle their attacks early.
“We managed to stop them building the game and got joy off pressing and winning the ball higher up the pitch,” the hosts’ coach Michael O’Neill told Sky.
“It’s very difficult to do that against this level of opposition. I’m proud of what they gave.”
Halstenberg eventually settled German nerves, timing his half-volley to perfection as he angled Julian Brandt’s cross into the far corner just after the break.
They should have scored again in a scintillating start to the second half but instead had to wait until deep into stoppage for Gnabry to make sure of the three points.