Sol-to-Gel Transition in Dispersions of Layered Solids