Performs inversion of a viral 3 kp segment (G-segment) that encodes two alternate pairs of tail fiber proteins thereby modifying the host specificity of the virus. Binds as a dimer to the viral gix sites which are 34-bp palindromic sequences that flank the invertible G-segment. Catalyzes site-specific recombination in the presence of the host factor Fis. Gin dimers bound to each of the gix sites and host factor Fis bound to the enhancer come together to form the synaptic complex. Each Gin monomer introduces a nick and becomes covalently attached to the 5'-phosphate of the DNA, resulting in double-stranded staggered breaks at both recombination sites. A 180 degrees rotation of one of the two Gin dimers followed by religation of the DNA leads to the inversion of the G-segment (G+ or G- orientation). Homodimer. During inversion, two dimers associate to form a homotetramer. Expressed in the late phase of the viral replicative cycle. Expression of late genes is activated by the viral late transcription activator C. The dimerization region is in the N-terminus. The orientation of the G segment is defined as G+ and G-. G+ orientation provides S-U fibers whereas G- provides S'-U' fibers. S-U and S'-U' dont have the same host range (e.g. respectively E.coli and C.freundii). Belongs to the site-specific recombinase resolvase family. Translation initiates from a non-canonical start codon (GUG).