Gerek is a Turkish word and lazım is a word that derived from Arabic.
Gerek is both noun and adjective but lazım is only an adjective. There is no difference between their meanings, but gerek is a Turkish noun so you can decline it like; gerekli, gereksiz, gereği...etc.