Role in the series
Near the end of "Dungeons, Dungeons and more Dungeons" Ford revealed to Dipper, that the portal was dismantle, but it had create a tear in spacetime, he was able to contain it for now but it was very danger and Ford didn't want him telling anyone, not Stan or Mabel even but he tested Dipper with it before put it away again.
In "The Last Mabelcorn", Bill tells Ford that he can't keep the Rift save forever, as Ford says that with it, Bill still has a way of getting in to the human world and would trick or possess anyone to get. To Bill it's just a game but to Ford and Dipper it would mean the end of their word.
And in "Dipper and Mabel vs. the Future" the Rift was started crack and it what Bill has been waiting for, if it broke then all of realty would change and bring an event that Ford calls Weirdmageddon, however that was a way to patch it up for good but to do it Dipper and Ford need to find alien adhesive.
When Ford was captured by a drone he gave the Rift to Dipper and tells him to fix it with him, while he tries to save ford, Dipper puts the Rift safely in his bag
Near the end then weir able to get some in adhesive, however just as they weir really to make history, Dipper realized that he had the wrong bag while Mabel had run off with his bag that still the had the Rift inside, meanwhile Mabel finds it and hands it over Blendin Blandin who then drops and smashes it. Blendin then reveals to be possessed by Bill Cipher and knocks her out before leaving the time traveller's body, soon after the portal too Bill's world and everything that Ford feared had come true.