"As President of the Congress party, I am responsible for the loss of the 2019 election. Accountability is critical for the future growth of our party," he said in a letter that was put on his Twitter account.
"It is for this reason that I have resigned as Congress President."
The letter said: "Rebuilding the party requires hard decisions and numerous people will have to be made accountable for the failure of 2019.
"It would be unjust to hold others accountable but ignore my own responsibility as President of the party."
Gandhi said that while it was important for someone new to lead the Congress, "it would not be correct for me to select that person".
Earlier in the day, Gandhi told reporters in Parliament: "How would I know, this is to be decided by the Congress Working Committee (CWC). I have given my resignation. I am not the president. I have already resigned.”
“ The party should decide on the new president quickly without further delay, I am nowhere in this process. CWC should convene a meeting at the earliest and decide," Gandhi told the media.
Former Maharashtra Chief Minister Sushil Kumar Shinde, who is a prominent ‘dalit’ face of the party, is the front-runner in the race to Congress leadership, with the likes of Mallikarjun Kharge and Sachin Pilot also in the race, sources have said.
The Wayanad MP who became the Congress president in 2017, had offered to step down as the party chief on May 25, during the CWC meeting following the party's dismal performance in Lok Sabha elections, where it could manage to get only 52 out of 542 seats. He had himself lost from Amethi, his family pocket borough, to Union Minister Smriti Irani by a margin of 55,000 votes. He, however, was elected to the Lok Sabha from Kerala's Wayanad.
However, his resignation was unanimously rejected by the CWC. So far, several top leaders have met Gandhi and urged him to continue to lead the party.
Several attempts by leaders of various levels were made asking Rahul to go back on his decision, but he has time and again cleared his stand.
Despite senior members making serious attempts to convince the 49-year-old to rethink his decision, he has remained unfazed.