The treed island at left is Hoffman Island and the smaller (and more distant) one at right, which you might need to zoom in to see, is Swinburne Island. (The built-up land at far left is part of Coney Island.)
Construction on these two artificial islands began in the mid-1860s. They were built to serve as quarantines after two previous such facilities on Staten Island were burned down by angry neighbors. Isolated from the rest of the city, the islands proved to be more palatable locations for detaining the sick.
The Swinburne quarantine closed in 1928 and the island has been abandoned ever since, except for a stint as a control center for underwater mines during World War II. Starting in 1931, Hoffman Island saw a few different uses: it was home to a parrot quarantine, a picnic ground, and a merchant marine training school before being abandoned in 1947. The islands have been part of Gateway National Recreation Area since 1972, although they are off limits to the public.