The red barn-shaped building with the gray roof houses the pumps for the 1.2-mile-long Gowanus Canal flushing tunnel, which delivers relatively clean water from Buttermilk Channel into the stagnant, highly polluted canal. This increases oxygen levels in the canal, mitigating unpleasant odors and making the waters habitable for aquatic life. The tunnel is currently out of service while it's being repaired and upgraded; to compensate, the Department of Environmental Protection has installed a temporary system that injects oxygen into the waters of the canal.
When it opened in 1911, the tunnel was seen as a "long-looked-for emancipation from the evil smells of old Gowanus". Much fanfare accompanied its activation: decorated yachts and barges floated down the canal, and a young woman was crowned Miss Gowanus.
You can also spot a greenish-yellow birdhouse in this photo, mounted on one of the trees lining the canal. It was built and installed as part of an effort to provide attractive lodging for the various winged creatures that live along the Gowanus.