The fluid nature of the ocean, combined with planktonic dispersal of marine larvae, lowers physical barriers to gene flow. However, divergence can still occur despite gene flow if strong selection acts on populations occupying different ecological niches. Here, we examined the population genomics of an ectoparasitic snail, Coralliophila violacea (Kiener 1836), that specializes on Porites corals in the Indo-Pacific. Previous genetic analyses revealed two sympatric lineages associated with different coral hosts. In this study, we examined the mechanisms promoting and maintaining the snails' adaptation to their coral hosts. Genome-wide single nucleotide polymorphism (SNP) data from type II restriction site-associated DNA (2b-RAD) sequencing revealed two differentiated clusters of C. violacea that were largely concordant with coral host, consistent with previous genetic results. However, the presence of some admixed genotypes indicates gene flow from one lineage to the other. Combined, these results suggest that differentiation between host-associated lineages of C. violacea is occurring in the face of ongoing gene flow, requiring strong selection. Indeed, 2.7% of all SNP loci were outlier loci (73/2,718), indicative of divergence with gene flow, driven by adaptation of each C. violacea lineage to their specific coral hosts.