The Ivory Coast midfielder exchanged passes with Sergio Aguero on the edge of the area in the 70th before calmly placing a curling right-foot shot past diving goalkeeper Tim Krul.
He then made it 2-0 with a minute left as City exploited space left by the home side's search for an equalizer.
The result hit Newcastle's hopes of finishing in fourth place and qualifying for the Champions League but means City is now on course for its first English championship since 1968.