We solve the nonlinear evolution of pressureless, irrotational density fluctuations in a perturbed Robertson-Walker spacetime using a new Lagrangian method based on the velocity gradient and gravity gradient tensors. Borrowing results from general relativity, we obtain a set of Newtonian ordinary differential equations for these quantities following a given mass element. Using these Lagrangian fluid equations we prove the following collapse theorem: A mass element-whose density exceeds the cosmic mean at high redshift collapses to infinite density at least as fast as a uniform spherical perturbation with the same initial density and velocity divergence. Velocity shear invariably speeds collapse-the spherical top-hat perturbation, having zero shear, is the slowest configuration to collapse for a given initial density and growth rate. Two corollaries follow: (1) Initial density maxima are not generally the sites where collapse first occurs. The initial velocity shear (or tidal gravity field) also is important in determining the collapse time. (2) Initially underdense regions undergo collapse if the shear is sufficiently large. If the magnetic part of the Weyl tensor vanishes, the nonlinear evolution is described purely locally by these equations. This condition is exact for highly symmetrical perturbations (e.g., with planar, cylindrical, or spherical symmetry) and may be a good approximation in many other circumstances. Assuming the vanishing of the magnetic part of the Weyl tensor we compute the exact nonlinear gravitational evolution of cold matter. We find that 56% of initially underdense regions collapse in an Einstein-de Sitter universe for a homogeneous and isotropic random field. We also show that, given this assumption, the final stage of collapse is generically two-dimensional, leading to strongly prolate filaments rather than Zel'dovich pancakes. While this result may explain the prevalence of filamentary collapses in some N-body simulations, it is not true in general suggesting that the magnetic part of the Weyl tensor does not necessarily vanish in the Newtonian limit.