c.1400, "a blow, stroke," perhaps originally imitative of the sound of patting. The verb "to tap or strike lightly" is attested from c.1600, and the noun "light tap with hand" is from c.1804. The noun sense "that which is formed by patting" (as in pat of butter) is 1754, probably from the verb. The nursery rhyme phrase pat-a-cake is known from 1874.
"apt, suitably," 1578, perhaps a special use of pat (n.) in sense of "hitting" the mark. The adj. is 1638, from the adverb.