"move slowly, fail to keep pace," 1520s, earlier as a noun meaning "last person" (1510s), later also as an adjective, "slow, tardy, coming behind" (1550s, as in lag-mon "last man"). All are of uncertain relationship and origin, possibly from a Scandinavian source (compare Norwegian lagga "go slowly"), or some dialectal version of last, lack, or delay. Related: Lag; lagging.
in the mechanical sense "retardation of movement," 1855, from lag (v.). Also noted in Farmer and Henley ("Slang and Its Analogues") as American theatrical slang for "a wait," with an attestation from 1847. First record of lag time is from 1951.