Long-chain polyunsaturated fatty acids (LC-PUFAs) are essential for cellular structure and function. The elongation of very long chain fatty acids protein (ELOVL) is an enzyme involved in very long-chain fatty acids biosynthesis. In the present study, we performed a genome-wide analysis of the ELOVL family genes in the Pacific oyster Crassostrea gigas and characterized the functions of a CgELOVL2/5 gene and the genomic variations in the synthesis of PUFAs. A total of 9 CgELOVL genes were identified in four chromosomes of C. gigas, and could be grouped into five subfamilies. The CgELOVL genes were all involved in oyster larval development and four involved in response to external stress. Two tandem-duplicated genes showed nearly identical expression profiles and appear essential for the early embryonic development of oysters. Two genes (CgELOVL2/5, CgELOVL1/7) were differentially expressed in oysters with high and low PUFA contents, and CgELOVL2/5 could extend the fatty acids with C18:3n-3, C18:2n-6, and C20:5n-3 as substrates. In the CgELOVL2/5 promoter region, three SNPs and one indel were associated with the PUFA contents and had substantial impacts on the transcriptional expression of CgELOVL2/5. These genomic variations may lead to the PUFA content difference among oysters to some degree and showed potential in breeding applications. This study could contribute to research on the genetic dissection of oyster PUFA metabolism and provide clues for the molecular-based selection of high-PUFA Pacific oysters.