"contort, twist, make knotty," 1814, a back-formation from gnarled (q.v.). As a noun from 1824, "a knotty growth on wood." Earlier an identical verb was used imitatively in a sense of "to snarl" like a dog (1590s); Farmer and Henley ("Slang and Its Analogues") lists gnarler as thieves' slang for "a watch-dog."
c. 1600, probably a variant of knurled, from Middle English knar "knob, knot in wood, protruding mass on a tree" (late 14c.), earlier "a crag, rugged rock or stone" (early 13c.), from a general group of Germanic words that includes English knob, knock, knuckle, knoll, knurl. Gnarl (v.) "make knotty," gnarl (n.) "a knotty growth on wood," and gnarly (adj.) all seem to owe their existence in modern English to Shakespeare's use of gnarled in 1603:
[T]hy sharpe and sulpherous bolt Splits the vn-wedgable and gnarled Oke. ["Measure for Measure," II.ii.116]
"(Gnarled) occurs in one passage of Shakes. (for which the sole authority is the folio of 1623), whence it came into general use in the nineteenth century" [OED].