Here is how Wikipedia describes it.
In Deathly Hallows, it was revealed that Grindelwald had gone to Godric’s Hollow to investigate the grave of the Peverell brothers (the original owners of the Hallows), but struck up a close friendship with Dumbledore, and the two planned to establish a new world order, where wizards would rule over Muggles “for the greater good”. The phrase later became Grindelwald’s excuse for the atrocities he committed in his reign of terror. They also planned to work together in their quest for the Hallows. Later Rowling claimed at a Q&A session that she implied Dumbledore being once in love with Grindelwald, and thus he has ‘lost his moral compass,’ but she did not say whether those feelings were returned.[12][13]