They've existed since antiquity. For example Clonycavan man from 300-200 BC was found with hair spiked with pine resin. According to Encyclopedia of Hair: A Cultural History ancient Egyptians used a pomade made from beeswax and fat extensively. Similar products were found in many other ancient and primitive cultures. In the 1600's and 1700's pomade was used to style real hair and wigs and creates a tacky surface for powder to stick to. DEP Corporation claimed to have invented modern hair gel in 1955, I am not aware of anyone challenging the claim.