The Garden of Forking Paths - S7-E3
Continuity mistake: In this episode, Henry, Regina and Nook (New Hook), arrive to meet up with Cinderella to join the resistance against Lady Tremaine. In the previous episode, Emma and Hook announced they were expecting a child. No issues there, except that in the last episode of the season Henry and Cinderella have Lucy who is about 10 years old, but Emma and Hook make an appearance with a newborn baby girl. Their daughter should be older than Lucy, since she was pregnant before Henry even married Cinderella. (00:11:13 - 00:38:27)
Revealing mistake: Hook's wire is visible as he climbs in Rapunzel's castle. (00:10:05)
Continuity mistake: When Alice and Mr. Gold are performing the magic ritual in the cave, the name on the Dark One's Dagger is misspelled "RumpELstiltskin". In every other episode where the dagger appears, it is spelled "RumpLEstiltskin." (00:30:25)
Revealing mistake: When Detective Rogers is chasing Naveen, in several wide shots, the person running isn't Colin O'Donoghue, but his stunt double. (00:25:50)
Revealing mistake: When Emma and Hook arrive at Regina's coronation with their infant daughter, as they enter the room, Hook is holding a doll and not a real baby. (00:38:25)
Answer: He knows who she is because he knows that the fairy tales are true. He was also shown to sneak out to go see Emma or someone else. Sometimes he succeeded, sometimes he didn't. This is how he knew to look for her despite his strict mother.