Gandhi joined politics inspired by the 2011 Indian anti-corruption movement, and campaigned for the AAP during the 2013 Delhi Legislative Assembly election. He contested the 2014 Indian general election from Patiala on an AAP ticket. During the campaign, he was assaulted in the Rasulpur Saidan area, allegedly by the Shiromani Akali Dal Municipal Councillor Rajinder Singh Virk. Gandhi defeated the incumbent MP Preneet Kaur by a margin of 20,942 votes.