The pig gastrointestinal tract (GIT) is an open ecosystem in which microorganisms and their host are mutually involved and continually adapt to different factors and problems which may or may not be host dependent or due to the production system. The aim of the present review is to highlight the factors affecting the GIT microbial balance in young pigs, focusing on the pre- and post-weaning phases, to define a road map for improving pig health and the production efficiency of the food chain. Birth and weaning body weight, physiological maturation, colostrum and milk (composition and intake), genetic background, environmental stressors and management practices, antibiotic use and diet composition are considered. Overall, there is a lack of knowledge regarding the effect that some factors, including weaning age, the use of creep feed, the composition of the colostrum and milk and the use of antibiotics, may have on the gut microbiome of piglets. Furthermore, the information on the gut microbiome of piglets is mainly based on the taxonomy description, while there is a lack of knowledge regarding the functional modification of the microbiota, essential for the exploitation of microbiota potential for modulating pig physiology.