Two Trees Development has agreed to buy the former Domino Sugar Factory property, possibly reviving a project to bring affordable housing to the site. Photo:

The developer credited with bringing luxury living to DUMBO has a cut a $180 million deal to buy the former Domino Sugar Factory site in Williamsburg — potentially reviving a $2 billion project to bring 2,200-apartments there.

Two Trees Development reached the agreement yesterday with Domino’s cash-strapped co-owner, Community Preservation Corporation.

Two Trees declined to comment on whether it would follow through with building 660 units of affordable housing on site — which CPC and its partner, the Katan Group, promised the City Council in 2010 to gain a key zoning change.

The Katan Group says it has serious reservations about “the propriety” of the deal. It supported a rival offer of $185 million from another Brooklyn developer, David Bistricer.

Community Preservation Corporation, as managing partner, had final say.

Williamsburg activist Isaac Abraham said Two Trees “will have an uphill battle and strong opposition from the entire community” if it fails to follow through with the affordable housing plan.