The commission had barred Mr Shafiq on Tuesday under a law that prevents senior officials from the era of President Hosni Mubarak from standing.
However, on Wednesday the commission upheld Mr Shafiq's appeal.
Mr Shafiq was the last prime minister to serve under Mr Mubarak, who was ousted by protests in February 2011.
"The decision to accept my client's appeal proves that the electoral committee functions as an independent body according to the rule of law," Shafiq's lawyer, Shawqi Sayyid, said, according to Reuters.
The law under which Mr Shafiq was originally disqualified bars from the presidency anyone who served in senior positions in government and the former ruling National Democratic Party under President Mubarak.
The law had been rushed through the Islamist-dominated parliament and ratified by the ruling Supreme Council of the Armed Forces (Scaf) on Tuesday.
However, in his appeal Mr Shafiq challenged the measure's constitutionality and the commission has now referred the law to Egypt's Supreme Constitutional Court.
The commission is due to announce the final list of candidates on Thursday.
Mr Mubarak's former vice-president and spy chief, Omar Suleiman, has also been disqualified for different reasons, along with two Islamists - Khairat al-Shater of the Muslim Brotherhood and Salafist Hazem Abu Ismail.
The front-runners among those left in the race are considered to be former Foreign Minister Amr Moussa, the independent moderate Islamist Abdel Moneim Aboul Fotouh and Mohammed Mursi, the chairman of the Muslim Brotherhood's Freedom and Justice Party (FJP).
The first round of voting is scheduled on 23 and 24 May, after which there is expected to be a run-off between the top two candidates in June.
The ruling Scaf, which assumed presidential powers after Hosni Mubarak was overthrown, is due to hand over to the new president on 1 July.

The 19-year-old has been with the Shakers since 2013 and scored two goals in 14 appearances last season.
However, he can return to Gigg Lane if Bury use the recall clause in his contract, which expires on 28 April.
He has had previous loan spells with National League North side Stalybridge Celtic and Norway's Bergsoy IL.

The scandal, known as "uranium-gate", resulted from a 2011 transaction between French nuclear giant Areva and companies both in Niger and abroad.
There is also a French investigation into some of Areva's business dealings, with aspects related to this deal.
Areva has not commented on the legal case in Niger, but says it is cooperating in the French enquiry.
Niger is one of the biggest uranium producers in the world and the metal is the country's largest export.
Many people turned up on Friday morning outside the court in the capital, Niamey, as representatives of civil society movements arrived to register the court action, the BBC's Himadou Hamadou said.
Their complaint alleges embezzlement of public funds, money laundering, forgery and conspiracy to defraud.
The legal action centres on the allegation that Areva in 2011 bought a stock of uranium from Niger at a discounted price.
Niger has two significant uranium mines that provides 7.5% of the world mining output from Africa's highest-grade uranium ores, according to the World Nuclear Association, the international organisation that represents the global nuclear industry.
Niger's first commercial uranium mine began operating in 1971, with a strong government support for expanding uranium mining.
Egypt's election commission has reinstated former Prime Minister Ahmed Shafiq as a candidate in the country's forthcoming presidential election.
[NEXT_CONCEPT]
Macclesfield Town have signed midfielder Scott Burgess on a season-long loan deal from League One club Bury.
[NEXT_CONCEPT]
Activists in Niger have started legal action into a uranium deal in which the country is said to have lost $3.25m.