Nature of the Kirkwood gaps in the asteroid belt