We propose and analyze a simple method to squeeze dynamically and unconditionally the collective spin of a dilute atomic ensemble by interaction with a driven mode of an optical resonator, as recently demonstrated [I. D. Leroux, M. H. Schleier-Smith, and V. Vuletić, Phys. Rev. Lett. 104, 073602 (2010)]. We show that substantial squeezing can be achieved in the regime of strong collective ensemble-resonator coupling. The squeezing is ultimately limited either by photon emission into free space or by the curvature of the Bloch sphere. We derive both limits and show where each prevails.