Planetary epicycles were part of the Ptolemaic model of the universe, where planets moved in small circles called epicycles while orbiting in larger circles around the Earth. This system was used to explain the apparent retrograde motion of planets before the heliocentric model and Kepler's laws provided a more accurate description of planetary movements.