A patent is, paradoxically, an exclusive right born from an open document. The word comes from Latin patēre — 'to be open, to lie exposed'. In medieval governance, a letter patent (lettre patente in Anglo-French) was a royal decree issued with its seal visible, not folded shut. Anyone could read it. It was public.
Monarchs used letters patent for all kinds of proclamations: land grants, noble titles, monopoly rights. When a king wished to give someone the sole right to manufacture a new product, he issued a letter patent. The document was open; the right it granted was closed to competitors.
This is how patent came to mean 'exclusive right to an invention'. The first English patent statute, the Statute of Monopolies (1624), formalised the practice. By then the word had already shifted from describing the document's format to describing what the document protected.
The adjective patent, meaning 'obvious' or 'evident', preserves the oldest sense. A patent lie is one that lies open for all to see — nothing hidden about it. Patent leather takes its name from the same idea: a surface so open and glossy that it conceals nothing.
The pronunciation splits along this history. The noun (a patent for an invention) is usually /ˈpæt.ənt/. The adjective (patently obvious) tends towards /ˈpeɪ.tənt/ in British English.