Just seems opportunistic to randomly decide someone should be gay at the last book. I wonder how it will play out. Dumbledore's boyfriend visits Hogwarts and they make out in front of the students?
Guess you haven't read the last two books...
To specifically address your first sentence, I don't think she randomly decided that he was gay at the end. The way it sounds to me, she knew before, but just hadn't had a reason to mention it. Someone had him saying something in the script of a movie that clearly identified him as straight, so she said "uh, no... he's gay." At that point, the news was out, so when someone asked her at a book reading about Dumbledore finding love, she outed him more publicly.