The bus was carrying students returning from an excursion when the incident happened on a motorway south-east of the capital Islamabad late on Monday.
The police said mechanical failure caused the crash.
Pakistan has one of the world’s worst records for traffic accidents, blamed on poor roads and faulty vehicles.
The police said that the bus fell into the ravine after its brakes failed.
The accident happened in Kalar Kahar, Punjab province, about 160km (100 miles) south-east of Islamabad.
The driver, his assistant and the deputy-headteacher from the school were among the dead, police officer Chaudhry Salim told the AFP news agency.
In June, at least 12 children died after their school bus plunged into a canal in the Pakistan-administered Kashmir.