Gl 758 B is a late-T dwarf orbiting a metal-rich Sun-like star at a projected separation of {rho}~1.6" (25 au). We present four epochs of astrometry of this system with NIRC2 at Keck Observatory spanning 2010 to 2017 together with 630 radial velocities (RVs) of the host star acquired over the past two decades from McDonald Observatory, Keck Observatory, and the Automated Planet Finder at Lick Observatory. The RVs reveal that Gl 758 is accelerating with an evolving rate that varies between 2 and 5 m/s/yr, consistent with the expected influence of the imaged companion Gl 758 B. A joint fit of the RVs and astrometry yields a dynamical mass of 42_-7_^+19^ M_Jup_ for the companion with a robust lower limit of 30.5 M_Jup_ at the 4-{sigma} level. Gl 758 B is on an eccentric orbit (e=0.26-0.67 at 95% confidence) with a semimajor axis of a=21.1_-1.3_^+2.7^ au and an orbital period of P=96_-9_^+21^ yr, which takes it within ~9 au from its host star at periastron passage. Substellar evolutionary models generally underpredict the mass of Gl 758 B for nominal ages of 1-6 Gyr that have previously been adopted for the host star. This discrepancy can be reconciled if the system is older - which is consistent with activity indicators and recent isochrone fitting of the host star - or alternatively if the models are systematically overluminous by ~0.1-0.2 dex. Gl 758 B is currently the lowest-mass directly imaged companion inducing a measured acceleration on its host star. In the future, bridging RVs and high-contrast imaging with the next generation of extremely large telescopes and space-based facilities will open the door to the first dynamical mass measurements of imaged exoplanets.