Welcome to Harry Potter Answers. What would you like to know?

Harry realised that he had seen the Diadem before, in the Room of Requirement. So they went back there and Found it in the end.

In the film, the Gray Lady (note the spelling), the ghost of Helena Ravenclaw, has more information on the location of the diadem.