late 14c., "performing a service" (a sense now obsolete); c. 1400, "required by duty," from Old French oficial "official; main, principal" (14c., Modern French officiel) and directly from Late Latin officialis "of or belonging to duty, service, or office," from Latin officium "service, kindness, favor; official duty, function, business; ceremonial observance," literally "work-doing," from ops (genitive opis) "power, might, abundance, means" (related to opus "work," from PIE root *op- "to work, produce in abundance") + combining form of facere "to make, to do" (from PIE root *dhe- "to set, put").
Meaning "pertaining to an office or official position" is from c. 1600. That of "derived from the proper office or officer," hence "authorized," is by 1854.