From Middle English dabben ("to strike"), perhaps ultimately imitative. Comparable with Middle Dutch dabben ("to pinch, knead, fumble, dabble") (Dutch dabben ("(of a horse) to stamp with the forelegs")), Dutch deppen ("to dab"), possibly German tappen ("to fumble, grope").
The noun is from Middle English dabbe ("a strike, blow"), from the verb. Related to tap. Compare also drub, dub.
African-American sense of “playful box” perhaps influenced by dap.