Half of the mane cast: RD, Twi, and Pinkie, and a couple of other side characters like Snips are making a trip by train to visit a town near the Equestrian border called "Dream Valley" where some of their relatives live.
According to their guidebook, Dream Valley is a weird place that apparently surrounded by a strange mist that makes the town inaccessible from all directions save for the official road, and even the road gets closed up during certain times of the year. The mist can play tricks with the mind, inducing a dreamlike haze and occassional headache that takes getting used to for first-time visitors. Celestia has also warned them in advance about the forest around the town, a magical place where "ancient ideas go to die". As the characters pass through the forest from the train station to the town, they see many strange but familiar shapes in the fog cameos from other shows etc.) but they attribute the illusions to the mist's obscuring effect.
Once they arrive, they are surprised to see that Applejack is already there. She's apparently well known in town and is helping out the residents here with their work, and has visited the town many times before. Snips runs off to rendezvous with his brother Teddy who lives here as a student. The mane6 also manage to find their own relatives: Twilight's unnamed grandmother, Pinkie Pie's 3rd cousin Surprise, and most importantly, Dash's mother Firefly.
After a heart-to-heart with her mother, Dash is determined to make her to return with her to Cloudsdale and make her see her dad, so that they can live as a family again. She refuses, citing the important work in Dream Valley as the reason. The 3 protags start to become suspicious of the valley, after they realize that none of the residents knows anything about the rest of Equestria and see that even fillies are forbidden to cross the town boundaries (the dangerous forest being the supposed reason).
Dash insists that the mist must be doing something to their heads or perhaps makes them magically unable to leave. It seems like she's only stubborn because of her mom, but Pinkie Pie accidentally confirms this when she invites a filly to the forest to play, but once they start walking through the mist the filly somehow always ends up back in town. Only the residents seem to be affected though. Twi starts to speculate about the mist and begins working on a spell to remove it. But as they are trying to test it, Spike unexpectedly appears.
He reluctantly reveals that both him and Applejack are originally from this town: his egg was found in the forest and Applejack's ancestors have been citizens of the valley. Since neither characters were actually born here, they are able to cross the unpassable mist which is how they could both get there without taking the main route like the other characters.
The mist indeed affects the citizens: after they have breathed the air here for a while, they are unable to breathe anything else for very long, even if they could make it out of the town.
The mist does not just cut off the valley, it actually maintains it, so banishing the magic would make the town disappear as well.
The mane6 reluctantly give up their plan except for Ranbow Dash, who tries to drag her mother accross the town borders, pulling her and calling out her name even after she can't see anything from the thick mist anymore. She faints and wakes up on the train back home. To the rest the visit already seems like a sort of dream and they start to question how much of it was real and how much was just caused by the mist's poisonous effect.
Twi tries to reassure Dash, and points to Applejack (who's somehow on the train travelling back with them, along with Spike, who's already back to normal) and the relatives AJ has to leave back in Dream Valley, yet still staying strong. Twi reassures Dash that even if her mom can't come back to Ponyville with her, her spirit lives on in Dash, which finally makes Dash accept the situation.