He ultimately succeeds by trapping Gwawl in a magic bag that can never be filled and having him beaten to death in the bag.
In the end, he achieves victory by confining Gwawl inside an enchanted pouch that cannot be emptied, and then having him killed with brutal force within the bag.