mid-13c., "full of knots" (figurative use, of questions or problems, is attested from early 13c.), from knot (n.) + -y (2). Related: Knottiness.
I faced the knotty problem of what to have for breakfast
a knotty problem