Eredivisie: Groningen 2 NAC Breda 1
Erwin van de Looi's side went into Friday's Eredivisie clash in fine form, having reeled off three consecutive league victories.
Relegation-threatened Breda made Groningen work hard to make it four wins in a row, but Kostic struck at the death to move his side seven points clear of ninth-placed PEC Zwolle.
Nebojsa Gudelj's team, who are now winless in nine Eredivisie outings and remain just four points above the relegation play-off zone, frustrated their hosts in the first half, but Groningen midfielder Nick van der Velden broke the deadlock from the penalty spot 10 minutes after the interval.
Croatian forward Stipe Perica brought Breda level 18 minutes from time, the target man displaying his technical and physical prowess by chesting down a long ball in the Groningen area before turning deftly and slotting past Marco Bizot.
That goal looked to have secured a hard-earned point for the visitors, but Kostic had other ideas.
The Serbian, who had been booked for simulation in trying to win a penalty shortly before his winner, cut inside from the right and beat two defenders before firing low beyond Jelle ten Rouwelaar from 20 yards.