The maypole dancing is a part that has its basis in real midsummer festivals. In real Scandinavian midsummer, the maypole is a central symbol and people do dance around it. Also, the gathering of the community for the celebration is real. But the movie takes these normal, festive things and turns them into something more sinister in the context of the story.
Some of the traditional elements like the use of flowers and the idea of a multi - day celebration are based on real midsummer. Flowers are a big part of real midsummer, with people making flower crowns and decorating. In the movie, we see a lot of flowers too, but in a more eerie context. The multi - day aspect is also there in real life, and 'Midsommar' uses this to build up the tension and horror as the days pass and the strange events unfold. However, the movie's extreme and often disturbing plot twists are not part of the true midsummer story.
The general concept of a midsummer celebration as a time when the community comes together is based on true events. In Scandinavian cultures, midsummer is a big deal and people from the village or town gather. In 'Midsommar', they show this gathering, but then they add in all these fictional elements like the cultish behavior and the really extreme and often gory rituals. So, while the starting point of a community midsummer gathering is real, most of what follows in the movie is a fictional and horror - based take on it.