The Wikipedia article you link to actually gives a clear explanation: quoting from the Roman Calendar, "so that it would harmonize better with the Gospel story."
From 1389, when the feast was first made universal in the Western Church, until 1969 when the most recent edit was made to the Roman Calendar, the feast was held on July 2. This is exactly 1 week (the end of the octave) after the Feast of the Nativity (Birth) of St. John the Baptist on June 24. The idea was apparently to cluster feasts relating to John the Baptist.
In 1969, the Roman Calendar was updated, and several celebrations of the Latin Rite of the Church were added, removed, or moved—this was the case with the Visitation. The entry in the Calendar's chapter "Variationes in Calendarium Romanum Inductae" ("Changes Introduced into the Roman Calendar") for July 2 reads:
In Visitatione B. M. V.
Ss. Processi et Martiniani
Festum Visitationis die 31 Maii reponitur, i.e. inter sollemnitates Annuntiationis Domini et Nativitatis S. Ioannis Baptistae, quo aptius consentiat narrationi evangelicae.
On the Visitation of the Blessed Virgin Mary
Saints Processus and Martinian (i. e. these saints are celebrated instead)
The Feast of the Visitation is restored to the 31st day of May, that is between the solemnities of the Annunciation of the Lord and the Birth of Saint John the Baptist, by which [movement] it more appropriately agrees with the story of the Gospel.
(Calendarium Romanum 1969; my translation)
Pope Paul VI and his advisors seem to have had in mind the Gospel according to Luke:
The angel said to [Mary] in reply ... "Behold, Elizabeth, your relative, has also conceived a son in her old age, and this is the sixth month for her who was called barren." ...
During those days Mary set out and traveled to the hill country in haste to a town of Judah, where she entered the house of Zechariah and greeted Elizabeth. ... Mary remained with her about three months and then returned to her home.
(Luke 1:35, 36, 39, 56; New American Bible, Revised Edition)
We are not told exactly how long after the angel's announcement Mary set out, but traditionally the Church has held that Mary was with Elizabeth from approximately the sixth month of the pregnancy until birth; that is, from the conception of Jesus until approximately the third month of pregnancy. This would have been about six months before the birth of Jesus, or about June 25. The birth of John the Baptist is, indeed, celebrated on June 24. Any time between March 25 and June 24 would seem appropriate, but it's not clear why May 31 in particular was chosen. May 31 had been used to celebrate the Queenship of Mary, and that feast was moved to August 22, the week after the Assumption.
As a note, there is no "Pentecost season" in the Western Church. If Easter falls between March 22 (the earliest possible date) and April 11, Pentecost will fall no later than May 30, putting the Visitation in Ordinary Time (during, I believe, the 9th week of Ordinary Time). If Pentecost falls later (it can fall as late as June 14), then the feast is during the Easter Season.