Lore is an Old English word that means something like body of knowledge or the knowledge that is taught, which means it has been in the English lexicon for nigh on a thousand years.
Folklore, on the other hand, is much more recent. It was famously coined in 1846 by William Thoms, a British writer who was particularly interested in antiquities, including myths, fairy tales, and other sorts of oral traditions.
Folklore is related to lore, as you might expect, because folklore is exactly that: the lore of the folk. In other words, folklore is the body of knowledge that constitutes the myths, old wives' tales, legends, and other cultural foundations of a group of people.
Folklore can be contrasted with herb lore, for instance, which is the body of knowledge concerning the means of cultivating and using plants for medicinal purposes.