He defeated Amita Singh, a former national badminton champion and former MP Sanjay Singh's wife.
Mr Singh, who romped home from the constituency in 2009, was earlier this year elected to the Rajya Sabha from Assam.
Mr Gandhi had contested the 2009 Lok Sabha polls from Pilibhit, but shifted to Sultanpur "to continue the legacy of his father Sanjay.''
Mr Gandhi, in his campaign trail, refrained from taking the name of Narendra Modi, the BJP's prime ministerial candidate, and, instead, fought on his father's legacy.
The BJP, and its ally Apna Dal, are leading in 57 of the 80 constituencies in Uttar Pradesh. It had 10 in the outgoing Lok Sabha.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.