From the Old Norse preposition gegn; compare with igen (“again”) and Norwegian Bokmål gjen-.
gen-
The prefix may take a verb or a verbal noun.