In Part 1, with the upcoming coronation of Princess Twilight, the villain trio have been carefully influencing the ponies to distrust each other and even figured out how to utilize Grogar's bell to make themselves far more powerful than before. When Grogar returns, they use the bell to take away his magic, revealing that he's actually been Discord in disguise all along. Discord escapes to warn Twilight and her friends of the impending trouble, while confessing he had arranged the villain team-up (including the return of King Sombra) in an effort to boost Twilight's confidence ahead of her coronation.
Without Discord's chaos magic to fall back on, Twilight quickly sends out messages to warn everyone in Equestria about the inevitable invasion. The Pillars (the six heroes from the past introduced in the Season 7 finale) prepare to guard the borders, but are easily defeated and weakened by Tirek. At the School of Friendship, Trixie helps the students reach shelter while Starlight confronts Chrysalis, who is able to defeat and capture her. Back at Canterlot, Cozy Glow attacks Twilight and friends, and even manages to use Grogar's bell to take away Celestia and Luna's magic. The heroes are barely able to hold off Cozy Glow, but Tirek and Chrysalis arrive and the trio quickly overwhelm them. But at the last minute, at the urging of her friends, Twilight reluctantly teleports away.
In Part 2, the villain trio have imprisoned Twilight's friends, the Pillars, the Princess sisters, and Discord, but are in disagreement on what to do next. Discord tries to make up for his failure by confronting the villain trio, ultimately tricking Tirek into blasting open Starlight's cage, allowing her to free everyone else, and tells Twilight's friends to escape and find Twilight while she and the princesses hold the villains back. As the main ponies try to find Twilight, they discover the unicorns, earth ponies, and pegasi have isolated themselves due to immense distrust in each other. The main ponies eventually find Twilight in the Crystal Empire, but despite her best effort, she's been unable to come up with a plan on how the stop the villain trio, and things get even worse when the windigos show up (due to the amount of hatred and distrust among the ponies). But with some encouragement from her friends, Twilight decides they should directly confront the villains.
Twilight and friends return to Canterlot and fight the villain trio while attempting to take away Grogar's bell. They are unable to beat the villains, but just when all hope seems lost, a massive army of ponies, griffins, dragons, changelings, yaks, and hippogriffs arrive to help out, and it's revealed the Young Six had used their lessons from the School of Friendship to rally their respective kinds together. Inspired by the efforts of all those creatures, Twilight inspires her friends, the Pillars, and the Young Six, and together their combined magic of friendship banishes the windigos and strips the villains of the magic they got from Grogar's Bell. After Discord and the Princesses recover their magic from the bell, they finish off the villains by imprisoning them in stone (as suggested by Discord). Having proven herself ready to rule Equestria, Twilight decides to postpone her coronation until after Canterlot Castle is repaired, and she and her friends celebrate their victory by having some donuts together (much like they did back in the final scene of the Season 1 finale).
As I mentioned earlier, trying to avoid spoilers for weeks was very difficult, but the few pieces I got were not enough to tell me what really happens, and a real testament to that is how I was totally surprised by that twist of Grogar being Discord all along within only the first few minutes. For being the series finale, I was totally expecting practically all of the friends the Main Six had made over the years to come together to help them win the final epic showdown, and not only did we actually get that, I was especially excited that it was the Young Six who rallied them all together. But perhaps the part that I found most impressive of all was how that final rainbow laser attack was powered by the three groups of six friends representing the past (Pillars), present (Main Six), and future (Young Six), all working together. Overall, definitely an epic two-part episode worthy of being the series finale.