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 created a tear in spacetime. However, he was able to contain it for now but it was very dangerous and Ford didn't want him telling anyone, not even Stan or Mabel, 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 saved forever, as Ford says that with it, Bill still has a way of getting into 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 started cracking and it was what Bill has been waiting for, if it broke then all of realty would change and bring an event that Ford calls Weirdmageddon. However, there was a way to patch it up for good, but to do it, Dipper and Ford would have to find alien adhesive.
When Ford was captured by a drone, he gave the Rift to Dipper and tells him to fix it for him, while he tries to save Ford, Dipper puts the Rift safely in his bag.
Near the end, they were able to get alien adhesive, however, just as they were about to save the universe, Dipper realized that he had the wrong backpack, while Mabel had run off with his backpack that still the had the Rift inside, meanwhile Mabel finds it and hands it over to Blendin Blandin because she thought he would but her in a time bubble, who then drops and smashes it. Blendin then reveals to be possessed by Bill Cipher and knocks her out before leaving the time traveler's body. Soon after, the rift was beaming a gateway into the sky, welcoming Bill's universe into Earth, and everything that Ford feared had come true.