Know how to use "fewer" and "less"? Find out.
1520s, in now-obsolete sense "crooked, gnarled, rough," from extended sense of crab (n.1) + -y (2). Meaning "disagreeable, sour, peevish" is attested from 1776, American English. Both senses were found earlier in crabbed.