U.S. District Judge Jeannette Vargas' decision keeps the project going, pending future arguments in the case.
The work was supposed to stop after Friday.
The White House has not said whether it will appeal the ruling.
"This is a critical victory for workers and commuters in New York and New Jersey. I am grateful the court acted quickly to block this senseless funding freeze, which threatened to derail a project our entire region depends on. The Hudson Tunnel Project is one of the most important infrastructure projects in the nation, and we will keep fighting to ensure construction can continue without unnecessary federal interference," New York Attorney General Letitia James said.
"GDC is pleased with the court's decision today. We thank our partners in New York and New Jersey for taking action to help us access the federal funding for the Hudson Tunnel Project. As soon as funds are released, we will work quickly to restart site operations and get our workers back on the job," the Gateway Development Commission said in a statement after the ruling.
New Jersey Governor Sherrill said, "President Trump's arbitrary and politically motivated decision to freeze this funding is plainly illegal, and we will continue to pursue full relief so the nation's most urgent transportation projectcan keep moving forward - and workers can keep putting food on the table."
Earlier in court, New Jersey Deputy Solicitor General Shankar Duraiswamy argued that withholding the funds would "torpedo the entire project," with minor delays potentially compounding to significantly delay construction.
"Project sites cannot simply be abandoned," said Duraiswamy. "There is literally a massive hole in the earth in North Bergen, New Jersey that must be secured."
Duraiswamy argued that New York and New Jersey will suffer irreparable harm if funding remained frozen, while the Trump administration has done little to justify the pause.
"This more than simply a desire for a capital improvement - this is a critical infrastructure project to fix a system problem," he said. "We have absolutely no articulable interest from the government in holding onto this money."
ABC News reported on Friday morning that President Donald Trump recently suggested he would unfreeze $16 billion in funding if Sen. Chuck Schumer supports renaming Penn Station in Midtown and Dulles Airport in Virginia after the president, according to people with knowledge of the conversations.
Sources told ABC News that Schumer rejected Trump's offer.
A Schumer official said the senator has "nothing to trade," and the president stopped the funding and can restart the funding without any congressional action, "with a snap of his fingers."
Democrats seized on the development as an example of Trump's negotiating priorities.
"If he wants something named for him, I've got plenty of landfill in Middlesex or Monmouth County," Representative Frank Pallone said. "Maybe a Superfund site. I'll name something after him."
New York Gov. Kathy Hochul's press office posted a photo of Trump Tower renamed "Hochul Tower" -- calling it her "counteroffer."
Sen. Kirsten Gillibrand of New York called it "ridiculous."
New Jersey Gov. Mikie Sherrill and Senator Cory Booker slammed the president at a Friday news conference.
"This is sabotage. This is political hostage-taking," Booker said. "This is actually one of the worst acts of extortion I've ever seen."
Booker slams Trump for blocking tunnel funding
"Every single time President Trump gets involved, our working men and women suffer, and you're seeing it here today," Sherill said.
Labor leaders joined the call, urging the administration to keep the project moving and warning of long-term consequences if construction is halted again.
"The last time this project was stalled, it took 17 years to get it restarted," said Robert Campos of Laborers Local 472. "Our members and our country cannot afford to wait another 17 years."
Funding for the critical project, which is expected to generate nearly $20 billion in economic activity and sustain 90,000 jobs, was suspended in September by the Department of Transportation for a purported review of the project's compliance with federal law. While the Gateway Development Commission confirmed it had complied with all the Trump administration's requests by January, the funding has remained frozen.
Amid the funding freeze, Gateway has tapped its remaining operating budget to continue work, though the money was set to run out on Friday.
Officials in New York and New Jersey said if the funding was not restored by Friday, the project would stop, leaving approximately 1,000 construction jobs in jeopardy.
New York and New Jersey asked the judge to declare the funding suspension unlawful and to order payments to resume immediately so construction can continue without interruption.
Sherrill said the two states are united in their legal challenge.
"The states of New Jersey and New York are joining together to sue the Trump administration to force it to stop holding the Gateway Tunnel project hostage in a political fight," Sherrill said.
Sherrill added that the president could have put the project back on track with a single phone call.
The $15 billion project is already about $1 billion underway, with roughly three-quarters of the funding expected to come from the federal government. New York and New Jersey were set to split the remaining $3 billion.
(ABC News contributed to this report.)
----------
* Get Eyewitness News Delivered
* More New Jersey news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube