Grant Williams dived over the tryline near the death as the Springboks came from behind to claim a record-equalling third win in a row over the All Blacks at a sold-out Ellis Park.