Nicholas Bradbury with the gadget, Alamogordo New Mexico, July 1945.
The gadget was the bomb fired at the Trinity test, July 16, 1945. The photo must have been taken on the 14th or 15 as the bomb has been hoisted into the tower. It seems likely that Bradbury (who was in charge of the gadget) wouldn't stop for a photo until he was finished, so this is likely from the evening of the 15th. The test took place before sunrise on the 16th.
The gadget was the first plutonium implosion bomb, and another like it was dropped on Nagasaki in August. The Hiroshima bomb was a much more primitive Uranium gun-type bomb. It was considered so reliable that it didn't need testing. The implosion bomb, by contrast was extremely complex. Inside the case is more than a ton of specially formulated high explosive designed to crush an orange-sized ball of plutonium to criticality. The charges need to be perfectly shaped and fitted, then exploded simultaneously or it won't work. By simultaneously, I mean within within all the charges needed to be fired within some millionths of a second. Thus the complex wiring and need for a test.