the source of the whole group of words, including gnarl (v.), gnarl (n.), gnarly, is Shakespeare's use of gnarled in 1603:
"Thy sharpe and sulpherous bolt Splits the vn-wedgable and gnarled Oke." ["Measure for Measure," II.ii.116]
OED calls it a variant of knurled, from M.E. knar "knot in wood" (late 14c.), originally "a rock, a stone;" of uncertain origin. "(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].