Salah, who has not been at his best since returning from injury last month, was brought on in the 79th minute, just after the Hammers' second goal levelled the game
The Germans went ahead with Serge Gnabry netting his fourth goal in four qualifiers in the ninth minute. The Dutch came back stronger after the break, scoring twice in seven minutes with Frenkie De Jong in the 59th and a Jonathan Tah own goal.
Georginio Wijnaldum completed the win in stoppage time.
Belarus earned a stoppage time 2-1 win at Estonia to claim their first points in the other game in the group on Friday.