While Teabing's in the back, Langdon takes the opportunity to confront Sophie about what she saw that drove her away from her grandfather.
He's put two and two together, and tells her he figured out she probably saw a sex rite. Maybe Saunière wanted Sophie to find him so he could explain to her what she saw that day.
It's a rite called Hieros Gamos. In Greek it means sacred marriage. It originated in Egypt. Long story made short: the moment of sexual climax was supposedly the only time a man could see God—via the sacred feminine.
Langdon is trying to reassure Sophie that what she saw wasn't some perversion. It was a sacred ritual.
The Church was the one who made sex into something disgusting and sinful. Before Christianity, sex was sacred.
Langdon can't seem to educate anyone without having a flashback to one of his lectures. He'd recently lectured on Hieros Gamos to his class earlier this semester.
Sophie tells Langdon everything she saw—which would definitely have been pretty disturbing if you didn't know the context.