When Dumbledore looks at the Mirror of Erised, he sees Grindelwald. In the story, he started to have romantic feelings toward Grindelwald. He was in love with Grindelwald's strength and his persona. Aside from the romantic feelings, it is likely that this is Dumbledore’s wish to become more powerful. He has always been attracted to power and he probably sees Grindelwald as someone who is powerful.
There are some people who are shocked by the revelation that Dumbledore is showing homosexuality but this is exactly what is being depicted in the story. His love for Grindelwald makes him long for him but he does not want to bring any harm to Grindelwald in the process.