Pork is one of the most consumed meats worldwide and it is subjected to consumer's preferences. Meat quality is affected by fatty acid (FA) composition in muscle and adipose tissues. Gut microbiota composition can also affect meat quality through the production of metabolites such as short-chain fatty acids. However, the relationship between pig genome and gut microbiota is not fully understood. In the current thesis, several studies have been performed to improve our knowledge about the genetic determinism of FA composition. In addition, the composition of the microbiota along the pig gut and its interaction with the host genome has been also analysed. Genome-wide association studies (GWAS) were performed among 38,424 single nucleotide polymorphisms (SNPs) and 60 phenotypic traits related to FA composition in backfat and muscle. This analysis was performed in 441 pigs from three different backcrosses: BC1_LD (25% Iberian and 75% Landrace), BC1_PI (25% Iberian and 75% Pietrain), and BC1_DU (25% Iberian and 75% Duroc) belonging to the IBMAP experimental population. Nine regions of the pig genome were associated with twelve backfat traits, while six regions were associated with six intramuscular fat (IMF) traits. A total of 50 candidate genes were proposed to explain the variation in these traits. The most promising candidate genes were ELOVL3, ELOVL6, ELOVL7, FADS2, FASN and SCD. Furthermore, ELOVL6:c. ‑394G>A was the most associated SNP with the percentages of C14:0, C16:0, and C16:1(n-7) in backfat. With the aim of detecting other variants apart from SNPs, we performed an indel detection with the whole genome sequencing data from seven founders (two Iberian boars and five Landrace sows) of the IBMAP pigs. A total of 1,928,746 indels were found in common among the three programs used (Dindel, SAMtools mpileup, and GATK). Ten indels inside genes related with lipid metabolism (ASPH, C1QTNF12, CAPN9, CCR7, CRP, GZMA, JMJD1C, LYST, PEX19 and SAMD4B) were genotyped in pigs belonging to the three IBMAP backcrosses, obtaining different allelic frequencies. The C1QTNF12:c. 557_559delCCG indel was associated with the percentage of eicosadienoic acid (C20:2(n-6)) in IMF. To describe the microbiota composition along the pig gut, luminal contents of five gut sections (duodenum, jejunum, ileum, and proximal and distal colon) were collected in thirteen Iberian pigs. A total of 1,669 operational taxonomic units (OTUs) grouped in 179 genera were found using the 16S rRNA gene sequencing method. Lactobacillus, Clostridium and Prevotella were the three most abundant genera. Colon samples were more similar among pigs and richer in species than small intestine samples were. The metagenome predictions showed that the energy pathways were different along gut sections. Finally, to reveal the association between host genome and gut microbiota in pigs, the microbiota composition of the rectum of 285 Iberian × Duroc pigs was obtained using the 16S rRNA gene sequencing method, finding 1,257 OTUs distributed in 101 genera and 18 phyla. Firmicutes and Bacteroidetes were the most abundant phyla. GWAS identified 17 genomic regions of the pig genome associated with the relative abundance of six genera (Akkermansia, CF231, Phascolarctobacterium, Prevotella, SMB53 and Streptococcus). A total of 38 candidate genes, related with the host defence system and the metabolism of mucopolysaccharides and bile acids, were suggested to be modulators of the gut microbiota composition.