This is just an Old English spelling of “jail.” It’s literally pronounced the exact same way.
It’s a little confusing because it sort of looks like “gallow” and it’s often used in the same context (“go to the gaol” works with both “gallow” and “jail”).