ALBANY – Mayor Bloomberg broke his Albany losing streak yesterday by winning state approval to build a trash-transfer station on the Hudson River near Gansevoort Street – the last hurdle to his sweeping overhaul of the city’s garbage system.

The deal followed a last-minute breakthrough in negotiations with Assembly Speaker Sheldon Silver (D-Manhattan), who has quashed several of the mayor’s most ambitious initiatives, from congestion pricing and his football stadium on the West Side.

The Assembly approved the $80 million-plus recycling transfer station early yesterday, its last act before adjourning for the summer.

The 92-48 vote came over the objections of three Assembly members who represent neighborhoods around the site in the Meatpacking District.

The victory allows Bloomberg to complete his massive revision of the city’s Solid Waste Management Plan.

“This is a legacy project for the mayor,” Deputy Mayor for Operations Edward Skyler told The Post. “We’re fundamentally handling the way the city handles its garbage, to deal with it an environmentally friendly way and not pit communities against each other.”

The plan was held up for two years as Assembly members debated Bloomberg’s plan to change the law that created Hudson River Park to allow transfer stations.

Critics – including Assembly members Deborah Glick, Richard Gottfried and Linda Rosenthal – argued that new truck traffic would endanger pedestrians and disrupt play at the surrounding Hudson River Park and pushed for a site further north.

The mayor countered that plan was unworkable and would cost as much as $300 million more a year.

A compromise worked out between Bloomberg and Silver requires the city to make up for any land displaced by the transfer station by adding park property or building new amenities.

The eventual remediation plan will require approval from Gov. Paterson, the mayor and the legislative leaders.

“I am pleased that we have worked together to enact legislation that will enhance Hudson River Park – with details to be spelled out in a joint memorandum of understanding – and help to lessen truck traffic, and permit the city’s Solid Waste Management Plan to proceed,” Silver said.

The compromise measure still requires approval from the state Senate, which could come as soon as the chamber’s planned summer session next month.

The Senate approved Bloomberg’s original plan last year and new Senate Majority Leader Dean Skelos (R-Nassau County) endorsed the compromise yesterday.