Origins
Before it meant a name tag, a label was a strip of ribbon dangling from a garment. The word comes from Old French label or lambel, meaning 'ribbon, strip, fringe', probably from Frankish *labba — a flap or hanging piece of cloth.
The oldest surviving use is heraldic. In coat of arms design, a label is a horizontal bar with three pendant points, placed across the top of a shield. It marks the bearer as the eldest son during his father's lifetime. The arms of the Prince of Wales carry this device today — a direct link to the word's medieval meaning.
The shift to 'identifying tag' happened pragmatically. Medieval clerks attached strips of parchment to documents and bundles as identifiers. These dangling strips were called labels, using the existing word for 'ribbon'. By the 17th century, the identifying function had overtaken the physical description.
Proto-Indo-European Roots
The Germanic root *lappō ('flap, rag') also produced lap (the fold of a garment), lapel (a small flap on a jacket), and lappet (a decorative flap). German Lappen still means 'rag' or 'cloth'.
The modern metaphorical sense — labelling a person, categorising them — emerged in the 19th century. It carries a faint echo of the physical act: affixing something external to define what is underneath.