We employ robust weak gravitational lensing measurements to improve cosmological constraints from measurements of the galaxy cluster mass function and its evolution, using X-ray selected clusters detected in the ROSAT All-Sky Survey. Our lensing analysis constrains the absolute mass scale of such clusters at the 8 per cent level, including both statistical and systematic uncertainties. Combining it with the survey data and X-ray follow-up observations, we find a tight constraint on a combination of the mean matter density and late-time normalization of the matter power spectrum, σ8(Ωm/0.3)0.17 = 0.81 ± 0.03, with marginalized, one-dimensional constraints of Ωm = 0.26 ± 0.03 and σ8 = 0.83 ± 0.04. For these two parameters, this represents a factor of 2 improvement in precision with respect to previous work, primarily due to the reduced systematic uncertainty in the absolute mass calibration provided by the lensing analysis. Our new results are in good agreement with constraints from cosmic microwave background (CMB) data, both Wilkinson Microwave Anisotropy Probe (WMAP) and Planck (plus WMAP polarization), under the assumption of a flat ΛCDM cosmology with minimal neutrino mass. Consequently, we find no evidence for non-minimal neutrino mass from the combination of cluster data with CMB, supernova and baryon acoustic oscillation measurements, regardless of which all-sky CMB data set is used (and independent of the recent claimed detection of B modes on degree scales). We also present improved constraints on models of dark energy (both constant and evolving), modifications of gravity, and primordial non-Gaussianity. Assuming flatness, the constraints for a constant dark energy equation of state from the cluster data alone are at the 15 per cent level, improving to ∼6 per cent when the cluster data are combined with other leading probes.