Marc Albrighton had given Claude Puel's Leicester the lead when he poked in Jamie Vardy's deflected cross on eight minutes.
Vardy nearly made it 2-0 with a curling shot before Kasper Schmeichel denied Angelo Ogbonna an equaliser at the other end.
But West Ham were level in the final minute of the first half, Kouyate heading in Manuel Lanzini's corner.
A first win in six matches would have lifted the Hammers out of the bottom three but Andre Ayew's overhead kick in stoppage time went just over.
Leicester climb one place to 11th ahead of the six Saturday matches.
West Ham: 29 Nov v Everton (A)
Leicester: 28 Nov v Spurs (H)