A strong fightback in the final Test against South Africa has given Australia a chance of levelling the series in Johannesburg.