The central mystery of "Gravity Falls" revolves around the identity of the author of the three journals. In the stunning mid-season 2 climax, "Not What He Seems," the author is revealed to be Grunkle Stan's long-lost twin brother, Stanford "Ford" Pines (voiced by J.K. Simmons), a brilliant scientist who had been trapped in another dimension for thirty years. It's revealed that our "Grunkle Stan" is actually Stanley Pines, who assumed his twin's identity after a science experiment gone wrong caused Ford's disappearance. Stanley spent the next three decades secretly trying to reactivate the portal beneath the Mystery Shack to rescue his brother, which was the true purpose behind his suspicious activities.
The overarching villain is Bill Cipher, a dream demon from the second dimension who manipulated Ford into building the portal so he could unleash "Weirdmageddon," a chaotic apocalypse, on our reality. In the series finale, Bill succeeds in crossing over and transforms Gravity Falls into his personal playground. The town's residents ultimately band together to fight back. The key to defeating Bill lies in a prophetic Zodiac wheel featuring ten symbols representing key characters. However, when Stanley's pride prevents the ritual from working, he realizes another way. Ford and Stan trick Bill into entering Stanley's mind instead of Ford's. Ford then uses the memory-erasing gun on his own brother, wiping Stanley's mind clean and destroying Bill, who was trapped inside it. In a deeply emotional conclusion, the family's love, channeled through Mabel's scrapbook, helps Stanley regain his memories, allowing him to finally reconcile with Ford before they set off to live their childhood dream of sailing around the world together.