Television footage broadcast by private channel NDTV showed people jumping off the top floor of the Takshashila building or trying to escape by climbing down the side, as thick smoke billowed out.
Most of those killed were pupils who had been attending class at a tuition centre housed in the building, according to the spokesman for the office of Gujarat Chief Minister Vijay Rupani.
A witness told Reuters that the students were school-aged children.
Television footage showed people trying to grab a large banner on the side of the building as they tried to escape.
Rupani has ordered an inquiry into the incident and asked Mukesh Puri, principal secretary of the urban development department, to submit a report within three days, the spokesman for his office said.
Prime Minister Narendra Modi said on Twitter he was thinking of the bereaved families.
(Production: ANI, Aiden Nulty)