"Met the family of Mohd Akhlaq and expressed my deepest condolences," Gandhi tweeted.
"It is very sad to see the trust and harmony built over decades, destroyed by the politics of hate.
"Hatred between our people weakens India. We have to stand together and fight those who spread it," he said.
Gandhi added: "Was touched by the desire of people in Bisada (Bisara) to maintain harmony. This spirit will help the country go through tough times."
On Monday night, 50-year-old Akhlaq, a resident of Bisara village of Dadri area in Greater Noida, was dragged from his home and lynched following rumours of sacrificing a cow and eating beef. The family says they were eating mutton.