Because Gwen Stacy was in the same university as Peter and Harry:
A student in Peter Parker's university class in Spider-Man 2, portrayed by Ellen Pompeo, is identified as Gwen Stacy in the film's novelization. - wikipedia
Here is the novelization if you want to look.
In comics Gwen knows a lot of people from Peter's life and she had more prominent ...