The initial stages of planet formation in circumstellar gas discs proceed via dust grains that collide and build up larger and larger bodies (Safronov 1969). How this process continues from metre-sized boulders to kilometre-scale planetesimals is a major unsolved problem (Dominik et al. 2007): boulders stick together poorly (Benz 2000), and spiral into the protostar in a few hundred orbits due to a head wind from the slower rotating gas (Weidenschilling 1977). Gravitational collapse of the solid component has been suggested to overcome this barrier (Safronov 1969, Goldreich & Ward 1973, Youdin & Shu 2002). Even low levels of turbulence, however, inhibit sedimentation of solids to a sufficiently dense midplane layer (Weidenschilling & Cuzzi 1993, Dominik et al. 2007), but turbulence must be present to explain observed gas accretion in protostellar discs (Hartmann 1998). Here we report the discovery of efficient gravitational collapse of boulders in locally overdense regions in the midplane. The boulders concentrate initially in transient high pressures in the turbulent gas (Johansen, Klahr, & Henning 2006), and these concentrations are augmented a further order of magnitude by a streaming instability (Youdin & Goodman 2005, Johansen, Henning, & Klahr 2006, Johansen & Youdin 2007) driven by the relative flow of gas and solids. We find that gravitationally bound clusters form with masses comparable to dwarf planets and containing a distribution of boulder sizes. Gravitational collapse happens much faster than radial drift, offering a possible path to planetesimal formation in accreting circumstellar discs.