Gloucester triumph in sloppy encounter