Inspired by this article:
http://www.theworldin.com/edition/2018/article/14442/south-africas-coming-political-crisis
A combination of things. Decreased foreign investment due to divestment campaigns and a general perception of political instability; massive spending in previous years on military campaigns in Namibia and Angola, as well as on internal policing; falling gold prices (gold prices were not low in 1985 by long-term standards, but had fallen sharply from 1980-1983 levels) combined with stagnating/falling gold production (stagnating from roughly 1980-1985, but off sharply from the ca. 1970 peak); long-term fallout from the oil crises of the 1970s.
Charles Feinstein's Economic History of South Africa is the classic text here, although it is focused more on the broad economic picture than on state finances.