These guns were used in the US Navy during WWII as "dual-purpose" guns meant to replace 20mm Oerlikons and 40mm Bofors as the main anti-aircraft weapons on large naval vessels. These guns fired a round which was 3 inches in diameter; the length of the barrel was 150 inches, 50 times the diameter of the round, giving its name of 3"50.  It was designed by the US Navy primarily as an anti-aircraft gun, but could be used for general purpose as well. The design was experimented with considerably along with what would become the 3"70 in the final years of WWII as they tried to find an effective defence against Japanese Kamikaze bombers.

In the 1950s, this gun was used by Canadian Tribal-class destroyers in the Korean War as an anti-aircraft weapon that could also be used for shore bombardment.

The 3"50 was mounted on the forecastle and quarterdeck of St. Laurent-derived destroyer escorts, forward of the bridge. It was also mounted in X position on the Tribals, A position on the Algonquin, and aft on Crescent after the latter two's anti-submarine warfare conversions. 

HMCS Bonaventure carried four of these mountings when originally commissioned but had the two forward mountings removed during her 1967 refit. 

HMCS Qu’appelle, of the Mackenzie-class ships, carried a second of these mountings forward in place of the 3"70 Mk.6 found on the rest of the class members.

Reference Links:
Youtube - 3"50 Caliber Dual Purpose Gun
Jerry Proc - 3"50 Gun