The cruiser USS Maryland in Dry Dock 2 at the Boston Navy Yard, around 1905. Image courtesy of the Library of Congress, Detroit Publishing Company Collection.
The scene in 2015:
The first photo shows Dry Dock 2 at the Boston Navy Yard, which was completed in 1905, not long before the first photo was taken. It was part of a large expansion of the facility, and it supplemented the much older and smaller Dry Dock 1. At 750 feet long, it could accommodate the Navy’s newest ships, including the Maryland, a Pennsylvania-class armored cruiser that, like the dry dock, was completed in 1905.
In the years after the photo was taken, the Maryland was eventually renamed the Frederick to free up the name for a new battleship, and the ship served in World War I. Like many other early 20th century American warships, though, the ship’s service history was brief. She was decommissioned in 1922, and sold for scrap in 1930.
As for the Boston Navy Yard, it remained in use throughout World War I, World War II, and beyond. It was finally closed in 1974, and part of it was taken over by the National Park Service as part of the Boston National Historical Park. Dry Dock 2 is just outside the park limits, but it is still intact, including the pump house, the small round building directly in the center of the 2015 photo. Just to the left of the pump house is Flagship Wharf, one of several modern condominium complexes that have been built on parts of the former navy yard.
For another scene of Dry Dock 2 in use, see the historic photo in this post, taken in 1929.