New York is missing out on billions of dollars in investments now that Amazon has canceled plans to add corporate offices in the borough of Queens, Rep. Gregory Meeks, D-N.Y., told CNBC on Thursday.

"I think it's a sad day for New York," the congressman said on "Closing Bell." "This was a long-term investment in the city."

The development would have included 25,000 jobs — many paying $150,000 or more — that could have diversified New York's economy beyond financial services and helped defend against an economic downturn, said Meeks, whose congressional district covers much of Queens.

Amazon backed out of the deal "a little too quickly in my estimation," he said.

The Seattle-based tech giant decided against building part of its so-called HQ2 in the Long Island City neighborhood after facing pressure from a chorus of local, state and congressional officials. Some Democratic politicians were critical of the private negotiations that led to a deal that traded $3 billion in tax incentives for the project.

"It's about standing up for a community in a state that ended up in a very bad place that we should have never been in," state Sen. Michael Gianaris said in a later appearance on "Closing Bell." The Democrat has represented the state's 12th District, which includes Long Island City, since 2001. He said the neighborhood is being overdeveloped and gentrifying.

Amazon said it backed off the plans because "a number of state and local politicians have made it clear that they oppose our presence and will not work with us" even though "polls show that 70 percent of New Yorkers support our plans and investment."

Gianaris shrugged off the poll results Amazon cited, saying Amazon had commissioned the poll itself. His reasons for opposing the deal include the company's anti-union stance and inclination to work with U.S. Immigration and Customs Enforcement.

"I do not think it's a good idea anywhere in this country to be throwing subsidies around to companies that don't need it because they're extorting us for their presence," Gianaris said.

Meeks likened the $3 billion subsidy to investing money in a bank account that would have yielded $25 billion in future revenues for the city and state, along with jobs of the future. This could have been an opportunity for Amazon and New York to compromise on a deal that would work, he added.

"I wish Amazon had stuck it out a little bit longer, because in the long term I believe that this would have been a good deal for both," Meeks said. "I think there's enough room for blame on both sides."

Gianaris countered that sentiment, saying the subway system is in "shambles" but tax breaks are being given to a company "that doesn't need it."

"The moment someone said, 'We don't like what you've done here, let's have a bigger conversation,' they left rather than having that conversation," he said.

New York Gov. Andrew Cuomo, who helped lead the charge to lure Amazon to the state alongside New York City Mayor Bill de Blasio, said in a statement that a "small group [of] politicians put their own narrow political interests above their community" and that "they should be held accountable for this lost economic opportunity."

In his own statement, de Blasio said, "We gave Amazon the opportunity to be a good neighbor" but the company "threw away that opportunity" in lieu of working with the community.

Rep. Alexandria Ocasio-Cortez, D-N.Y., who was one of the loudest critics of the move, said in a tweet that "a group of dedicated, everyday New Yorkers & their neighbors defeated Amazon's corporate greed, its worker exploitation, and the power of the richest man in the world." She represents parts of New York City that border the formerly planned headquarters.

Sen. Elizabeth Warren, D-Mass., also celebrated Amazon's withdrawal, tweeting that the company "walked away from billions in taxpayer bribes, all because some elected officials in New York aren't sucking up to them enough." She is seeking the Democratic nomination for president of the United States.

Shares of Amazon closed down more than 1 percent Thursday.