Yes indeed, this was the B&O -- specifically its Georgetown Branch, which left the Met Branch mainline at Georgetown Jct., west of Silver Spring, and ran in an arc around the west side of Washington via Chevy Chase Lake, Bethesda, and Dalecarlia. There was a tunnel under McArthur Blvd., after which the line turned east and descended the bluff to the C&O Canal, which it crossed over on the bridge you mentioned and then followed on the canal's south side into Georgetown.
The line was built in stages beginning in the 1890s and completed into Georgetown in 1910. When the line was first conceived, B&O had no direct rail access between Washington and the Southern Ry. (now NS) and RF&P (now CSXT), and the branch was to be the first link in such a connection. The plan was to bridge the Potomac just south of the Dalecarlia tunnel and build overland to connect with the SOU and RF&P. That, of course, never happened. It was made unnecessary when PRR, B&O, SOU, RF&P, and C&O got together to form the Richmond-Washington Co. to control the RF&P and to build Potomac Yard. But grading for the B&O's aborted direct line still exists at Dalecarlia.
The Georgetown branch was always strictly a freight line, primarily carrying inbound building materials and coal. For a while, a major coal customer was the Capital Traction Co. power plant in Georgetown, and the last major customer was a federal steam heat plant at the end of the line. Briefly too, the line carried stone for the various monuments on the Mall.
Service on the branch ceased in 1985, although it was not formally abandoned until 1988. Part is now a hiking trail, and there is a perennial (and controversial) plan to built a light rail line over the right-of-way between Silver Spring and Bethesda.