Twenty-seven children were among 30 killed when a school bus ferrying them back home plunged into a deep gorge near village Gurchal on the Nurpur-Chamba highway, about 100 km from the district headquarters at Dharamsala.
The deceased children were students of Ram Singh Pathania Memorial School, police said.
"I am deeply shocked to learn about the tragic bus accident...my heart goes out to the family members of the deceased," Naidu tweeted.
In a tweet, the PMO said Modi was deeply anguished over the loss of lives.
"My prayers and solidarity with those who lost their near and dear ones in the accident," the PMO said quoting the prime minister.
Thirty persons, including 27 children, have lost their life, Himachal Pradesh Transport Minister Govind Singh Thakur said.
Local BJP MLA, Rakesh Pathania, who was on the spot, said 27 bodies were recovered while two more had been spotted.
At least 13 seriously injured persons were rushed to a hospital in Pathankot where one of them succumbed to injuries, an official said. The condition of other injured persons was also critical, he said.
The bus was carrying 40-45 people and most of those killed were students of elementary classes, aged below ten.
Chief Minister Jai Ram Thakur announced an immediate relief of Rs 500,000 to the next of kin of each deceased.
A magisterial probe was ordered and preliminary enquiries suggested the accident occurred as the driver lost control over the bus which veered off the road and fell into a deep gorge, an official said.
A pall of gloom descended in the area as wailing parents rushed to the spot on hearing the news. Food and Supplies minister Krishan Kapoor was among the senior state functionaries at the accident site to supervise rescue operations.
The bodies were extricated from the rubble with the assistance of local youth.
Governor Acharya Devvrat, Chief Minister Jai Ram Thakur, Union minister JP Nadda, Transport minister Thakur, were among those who expressed deep shock over the tragedy.