The term 'fifth wheel' comes from a similar coupling used on four-wheel horse-drawn carriages and wagons. The device allowed the front axle assembly to pivot in the horizontal plane, to facilitate turning. Basically a wheel was placed on the rear frame section of the truck, which back then only had four wheels; this wheel that was placed on the frame was the "fifth wheel" hence the name. The trailer needed to be raised so that the trailer's pin would be able to drop into the central hole of the fifth wheel.
Fifth wheels were developed to allow the front axel of a carriage or cart to pivot, effectively turning it in to a dolly that was the hooked to a team.
They were developed directly from the original way of attaching the other four wheels on the carriage just turned sideways. It is pretty much a miniature wheel placed between the axel and suspension.