With nearly all of the votes counted it is clear that there will be a run-off on April 23 to decide the final outcome.
The Socialists won 43.3 percent of the vote while their coalition partners, the liberal Free Democrats, collected 6.3 percent, according to results published by the National Electoral Commission.
The main conservative opposition Fidesz party of former premier Viktor Orban won 42.2 percent.
No governing party has won reelection in Hungary since the transition from communism to democracy in 1989.
"Hungary did something it has never done since transition, it said the governing coalition can continue to govern," a beaming Mr Gyurcsany told cheering supporters at the Socialist campaign headquarters in Budapest.
"Any way I look at the numbers, I see that MSZP (the Socialists) won the first round of elections," he said. But the election is not over.
The small conservative Hungarian Democratic Forum (MDF) party in a surprise appeared to just scrape past the five percent bar necessary to remain in parliament, with exactly five percent, and became a potential lifeline for Mr Fidesz which is seeking to return to power after four years in opposition.
MDF president Ibolya David has refused to say if her party would form an alliance with any other parliamentary party, but Mr Fidesz has already expressed an interest in striking a deal.
"The (government) coalition won the first round but they did not win the elections," said political analyst Gabor Torok. "The MDF is now an uncertain factor.”
A second round run-off will take place on April 23, where those those parliamentary mandates will be decided where no candidate won a majority in the first round.
According to the 96 percent of votes counted, 212 of the 386 parliamentary mandates were decided in the first round. The Socialist-led coalition won 112 seats, according to the partial count, compared to 98 for Mr Fidesz and two for MDF.
