Substitute Mathias Honsak's stunning late goal gave Heidenheim a priceless win over VfB Stuttgart in their bid to stave off relegation.