Natural ecological communities display striking features, such as high biodiversity and a wide range of dynamics, that have been difficult to explain in a unified framework. Using experimental bacterial microcosms, we have performed the first direct test of recent theory predicting that simple aggregate parameters dictate emergent behaviors of the community. As either the number of species or the strength of species interactions is increased, we show that microbial ecosystems transition between distinct qualitative dynamical phases in a predicted order, from a stable equilibrium where all species coexist, to partial coexistence, to emergence of persistent fluctuations in species abundance. Under the same conditions, high biodiversity and fluctuations allow and require each other. Our results demonstrate predictable emergent diversity and dynamics in ecological communities.