Gauteng's second-best school is in the informal settlement of Ivory Park in Tembisa on the East Rand.
The top school is located in a black township in Pretoria.
Ivory Park Secondary School achieved a 94,9percent pass rate, ranking it second after Holy Trinity, which scored 96,47percent.
Gauteng education spokesman Kate Bapela commended Ivory Park Secondary for its outstanding performance.
"Schools like Ivory Park are not limited by their circumstances. They go out of their way to ensure that their pupils pass," she said.
The school outperformed far more privileged top-performing schools, such as Hoërskool Riebeeckrand and Afrikaanse Hoër Meisieskool.
Ivory Park also produced one of the best female mathematics and science pupils in the province.
Keletjo Ramatsoabane Choene came second after Thabang Baleseng Mosaka of Holy Trinity Secondary.
The best pupil in the province is Linda Oosthuizen of Afrikaanse Hoër Meisieskool.
The top five schools in the province are: Holy Trinity Secondary School, Ivory Park Secondary, Hoërskool Vanderbijlpark, Hoërskool Riebeeckrand, Afrikaanse Hoër Meisieskool.
The two top-performing districts were Sedibeng East with an 86,8percent pass rate and Tshwane South with 86,5percent.
Karabo Mohale of Holy Trinity and Bernard Makgahlele Soafo were two of the five best matriculants in the province.
Skhumbuzo Tuswa of Jordan Secondary, Michael Hlatshwayo of Umqhele Secondary, Everwell Mabanga of Tlakula Secondary, Rabira Mayat of Liverpool Secondary and Linda Oosthuizen of Afrikaanse Hoër Meisieskool were the top five maths and science students.