"semi-solid substance," 1899, as a chemical term, short for gelatin and perhaps influenced by jell. The invention of this word is credited to Scottish chemist Thomas Graham. Hair-styling sense is from 1958.
1902, "to become a gel," from gel (n.). Figurative sense "come together and agree well" is from 1958. Related: Gelled; gelling.