This is from Proto-Germanic *lofo (source also of Old Norse lofi, Gothic lofa "palm of the hand," Danish lab, Swedish labb "paw"), from PIE *lep- (2) "to be flat" (see glove (n.)). As a verb, "bring the head of a sailing-ship nearer the wind," from late 14c., from the noun.
"rebellious," by 1943, British nautical slang, perhaps a slang mangling of obstreperous. "Sea Passages: A Naval Anthology and Introduction to the Study of English" [1943, Geoffrey Callender] quotes from a letter:
Why Nobby should reckon that his raggie should blow the gaff, when there are crushers everywhere, leaves me guessing; but there it is. In the last dog he rounded on me and called me a white rat. I got stroppy and told him he was shooting a line: but all he said was, 'Oh! choke your luff! I'm looking for another oppo you snivelling sand-catcher.' So that looks like paying off.
to which Callender adds, "There is nothing in this letter which an active service rating could fail to understand."