The CKM angle gamma is measured for the first time from mixing-induced CP violation between Bs0 -> Ds -/+ K pi +/- pi -/+ and Bs0 -> Ds +/- K -/+ pi -/+ pi +/- decays reconstructed in proton-proton collision data corresponding to an integrated luminosity of 9 fb(-1) recorded with the LHCb detector. A time-dependent amplitude analysis is performed to extract the CP-violating weak phase gamma - 2 beta (s) and, subsequently, gamma by taking the Bs0-Bs0 mixing phase beta (s) as an external input. The measurement yields gamma = (44 +/- 12)degrees modulo 180 degrees, where statistical and systematic uncertainties are combined. An alternative model-independent measurement, integrating over the five-dimensional phase space of the decay, yields gamma=44-13+20degrees modulo 180 degrees. Moreover, the Bs0-Bs0 oscillation frequency is measured from the flavour-specific control channel Bs0 -> Ds-pi +pi +pi - to be m(s) = (17.757 +/- 0.007(stat) +/- 0.008(syst)) ps(-1), consistent with and more precise than the current world-average value.