From Middle English goundy, gundy, from Old English gundiġ ("goundy, mattery"), equivalent to gound + -y. More at gound.