From Bulbapedia, the community-driven Pokémon encyclopedia.
The Passage of Time is located in Deep Dusk Forest, in Explorers of Time, Darkness, and Sky. The Passage of Time is used to take long distance trips, such as trips to the past, according to Celebi.
After the player and their partner are trapped in the future with Grovyle, they make their way to Celebi, who informs them that the only way to get back to the present, is to take the Passage of Time, located in Deep Dusk Forest. Primal Dialga interfered with the time traveling, but Celebi was able to time travel them, closer to it and the player, their partner, and Grovyle were able to make it back to the past by jumping into it.