IMPORTANT NOTE: This is a temporal state that I use so admins would know how to edit the page. I will restore this back to its original state after it's done.
Gideon next appears in prison during the season 2 premiere, where he notices the unusual phenomena kicked off by Stan's work on the portal.
He reappears in The Stanchurian Candidate, this time secretly orchestrating Bud Gleeful's election bid for the post of Mayor; despite still being imprisoned and under heavy guard, he is able to communicate with his father via a video screen, and clearly hopes to receive a full pardon in the event that Bud wins. However, when Stan begins an election campaign of his own, Bud finds himself outmatched in the debating field, though only because Dipper and Mabel are correcting Stan's approach via mind control; unwilling to see his chance for freedom slip through his fingers, Gideon is forced to make use of a spell he stole from the second Journal (hidden in his hair up until now) and possess Bud's body. He first uses this spell to give Bud an easy win at the final debate of the election, and then to capture both Dipper and Mabel, arranging to blow them up with dynamite; however, Stan is able to rescue them, and in the chaos that follows, Bud loses the election and the Journal page is destroyed. Though apparently defeated, during the end credits, Gideon reveals that he is hiding a summoning circle for Bill Cipher in his cell; completing the circle, he claims he's ready to make a deal - essentially offering his services as Cipher's minion.
When Bill's plan to enter reality succeeds in Weirdmageddon: Part 1, he arranges for Gideon to be broken out of prison to serve as the sheriff of Gravity Falls and the guardian of Mabel's prison bubble - granting him all of eternity to get Mabel to love him. Having befriended most of his fellow prisoners, he also has a gang of his own, complete with monster trucks. When Dipper and Wendy attempt to steal a car from Bud Gleeful's dealership, they are immediately confronted by Gideon's gang; however, Wendy is able to steal the key to the prison bubble from Gideon and lead them on a wild chase through post-apocalyptic Gravity Falls, and though they eventually succeeded in surrounding them, Dipper manages to convince Gideon that he'll never be able to force Mabel to love him. Despite knowing full well that defying Bill will mean facing his wrath, he nonetheless decides to let Dipper free Mabel, and drives off with the rest of the gang to buy him and the others some time in a battle with Bill.
In Weirdmageddon 2: Escape from Reality, Bill learns of Gideon's betrayal but is largely unmoved by it, believing that the bubble will simply trap anyone attempting to rescue Mabel from it. Nonetheless, he orders the Henchmaniacs to fetch Gideon for punishment - though Gideon himself is not seen at any point in the episode.
In the series finale Weirdmageddon 3: Take Back the Falls, Gideon is locked in a birdcage while his gang members are petrified and added to Bill's throne of human agony; for good measure, he then is forced to do a cute dance against his will for Bill's pleasure - until Dipper and Mabel arrive in the Shacktron to free him and the other petrified victims. Ultimately, Gideon stays behind in the Fearamid to help Dipper, Mabel and their friends to stop Bill, proving instrumental in forming the Zodiac Wheel that Ford Pines believes will be able to stop Bill once and for all; unfortunately, an argument between Stan and Ford results in Bill ambushing the group, destroying the wheel and transforming everyone except the Pines family into tapestries for his palace. Fortunately, Stan and Ford are able to defeat Bill by tricking him into entering Stan's mind while Ford uses the Memory Eraser to wipe his brain, effectively destroying Bill with all his memories.
Following Bill's death, Gideon and the others are turned back to normal and the damage done by Weirdmageddon is reversed, much to the relief of all parties concerned. Gideon and his family later attend Dipper and Mabel's 13th birthday party, and Gideon admits that he's changed for the better. However, he still maintains a notably vindictive streak: when he's shown trying to ride on a skateboard, one kid makes fun of him, and an offended Gideon sends his gang members to beat up the kid in retaliation.