"The Trial of Jim Gordon" is the ninth episode of the fifth season of Gotham. It aired on March 7, 2019.
After Gordon is shot in an attempt to establish a cease-fire, he hallucinates a trial for his life that could have deadly real consequences. Meanwhile, Ivy returns and puts her spell on Bruce, leaving Selina to defend herself. Lee has a life-changing moment as Barbara and Penguin consider their next moves.
The final episode to be produced, but not the last to air. The last episode will be "The Beginning...".
Erin Richards makes her first directional debut in this episode.
Jonathan Crane, Kathryn Monroe and Lazlo Valentin make cameo appearances during Jim Gordon's dream sequence in which they attend his imaginary wake. During their appearances all three are in their costumes, with Crane as the Scarecrow, Kathryn in her owl mask, and Valentin dressed as Professor Pyg.