"Both Hindus and Muslims of Muzaffarnagar told me there is no enmity between people but politicians divide them," Gandhi told a rally here in western Uttar Pradesh.
"These politicians know that if there are no riots, they can't win the election," he said.
The violence in Muzaffarnagar, also in western Uttar Pradesh, left some 50 people dead and displaced over 40,000.
Gandhi said if Uttar Pradesh was not progressing, it was because people were being divided.
He exhorted people to unite. "Till you unite, UP will not progress."
Besides the Samajwadi Party, Gandhi targeted the Bahujan Samaj Party (BSP) also.
"Both the SP and BSP can't develop Uttar Pradesh. The Congress will do it."
Gandhi, who represents Amethi in Lok Sabha, also highlighted legislations like the food security act and the land acquisition act passed by the UPA government to show that it was sympathetic to the poor.
He said the people of Uttar Pradesh will not get cheap ration under the food security act as the state government was worried it might benefit the Congress in elections.
Spotted: Lara Dutta, Mahesh Bhupathi with their daughter in Bandra
Birthday special: Sushant Singh Rajput's journey from TV to films
Photos: Vibrant Sonakshi Sinha opens LFW 2017 on a cruise ship
Health in pictures: 8 reasons why people have unprotected sex
Photos: 'Peshwa Bajirao' TV show launch event in Mumbai