He had seen her once ...
... very briefly during the attack on Cintra
in Episode 7.
While various fan sites declare that the queen showed him an imposter when he returned and before he was imprisoned,
Geralt is even present when Calanthe jumps to her death, while at the same time, Mousesack ushers Ciri out of Cintra.
he got a glimpse of her on her way out the door. And there is also that brief moment where Geralt sees Ciri playing Knuckles when the handmaid wishes her goodbye to Her Highness; she turns towards him (even if she does not see him). (Thanks @Philip Klöcking).
- When the queen tried to placate him with an imposter it was not her scent that gave her away. He went to the street and saw the alleged princess saying goodbye to the boys, who hugged her and were familiar with her in ways that a real princess would not allow, then the girl curtsied to the real Ciri and addressed her as "your highness. – Thanks @krb(from a comment under another answer), this was another bit of pre recognition.
(If I remember this right, it is a subtle replay of a scene in Episode 2 where she is playing kunckles and she looks to her left, but we are not sure what she sees ... so I'll watch Episode 2 again. :) )
He had met her mother, and perhaps the family resemblence is very stront.
I was surprised to see the timeline linked to the Law of Surprise actually have Geralt
in Cintra
when much of the season had Geralt operating in a different time periods than that of the fall of Cintra.
A narratively based answer is that she recognizes him as Geralt of Rivia (The Witcher) and he recognizes her as "the girl in the woods" (whom Renfri had foretold in Episode 1) because of destiny. This fits the story to date because ...
Destiny appears to have narrative agency in this series
In this series, as shown by what happened to Queen Calanthe when she tried to thwart destiny by denying the Law of Surprise, destiny has tangible agency.
In a comment under the question, I like the way that @MishaR puts it:
... they are inexorably drawn together, and don't need to be especially familiar with each other visually to know each other.
Another in-universe point to consider:
(Thank you @ – goat_fab)
Geralt was familiar with the royalty of Cintra, and Witchers aren't that hard to identify - especially Geralt with his unique mutations and his storied history. From previous episodes, we know that a bard had made a career, years before Ciri's birth, of advertising the exploits of Geralt in various songs.
- Geralt could have very easily recognized Ciri as Pavetta's daughter given how similar they look.
- How many lone girls do you encounter in the woods? Ciri knew Geralt was a witcher and had likely heard some of his tales and his popular monikers. Not a ton of white-haired, orange-eyed Adonis' around.