Mr Modi said violence had "never done good for anyone".
A curfew has been imposed, after members of the influential Patel community, demanding quotas in government jobs, clashed with the police and local people.
A day-long strike called by the Patel community is also being observed.
Gujarat's main city, Ahmedabad, is virtually shut down, and the army and paramilitary soldiers have been deployed there and in Surat, BBC Hindi's Ankur Jain reports.
Internet services on mobile phones have been suspended. Schools and businesses are closed and public transport cancelled in Ahmedabad and other parts of the state.
Our correspondent says two protesters were killed in clashes with police in Ahmedabad on Tuesday and another in Banaskantha district on Wednesday.
Fresh clashes were also reported in Surat and Rajkot on Wednesday.
"Violence will not benefit anyone. The only way forward is to have a peaceful dialogue," Mr Modi said in a video message.
Clashes broke out late on Tuesday when police briefly detained the protesters' firebrand leader Hardik Patel, who had hours earlier led a massive rally in Ahmedabad.
Police said some 70 buses were torched by the protesters.
Gujarat police chief PC Thakur told the AFP news agency that at least a dozen officers were injured in the violence, prompting the curfew in different cities and districts.
Our correspondent says curfews have been imposed in nine areas of Ahmedabad, as well as in the Surat and Mehsana districts.
Gujarat has been particularly alert to incidents of violence since 2002 when religious riots left at least 1,000 people dead, most of them Muslims.
Mr Patel has appealed for calm, and accused the police of targeting his community.
"The police have assaulted members of my community and behaved like terrorists. We will carry out our movement peacefully. I am asking my supporters to fast in support of our cause," he said in a statement.
Patels - some 20% of Gujarat's population - control India's thriving diamond cutting and polishing industry and are among the most prosperous businessmen and farmers in Gujarat.
But they complain that they are denied college places because of affirmative action to ensure those below them in India's complex social structure have access.
And they say they have been affected by a slowdown in small and medium industries in Gujarat which has led to a drying up of employment opportunities.
Patels are now demanding affirmative action and classification as Other Backward Classes (OBCs) so that they are entitled to quotas in state-run education centres and in government jobs.
OBC refers to the castes - in the middle of the Hindu caste hierarchy - who do not face so much exclusion or isolation in society but have been traditionally socially and economically disadvantaged.
A half-kilometer brick wall has been hastily erected in India’s Gujarat state ahead of a visit by U.S. President Donald Trump, with critics saying it was built to block the view of a slum area inhabited by more than 2,000 people.
1 year, 7 months ago
The country that boasts of Asia's largest rail network and possibly the world's highest passenger traffic, will soon roll out a premier train service between Mumbai and Goa — popular destinations on the west coast.
4 years, 4 months ago