Background and aims: The gut microbiota is a complex ecosystem containing bacteria, viruses, fungi, yeasts and other single-celled organisms. It is involved in the development and maintenance of both innate and systemic immunity of the body. Emerging evidence has shown its role in liver diseases through the immune system cross-talk. We review herein literature data regarding the triangular interaction between gut microbiota, immune system and liver in health and disease. Methods: We conducted a search on the main medical databases for original articles, reviews, meta-analyses, randomized clinical trials and case series using the following keywords and acronyms and their associations: gut microbiota, microbiome, gut virome, immunity, gastrointestinal-associated lymphoid tissue (GALT), non-alcoholic fatty liver disease (NAFLD), non-alcoholic steato-hepatitis (NASH), alcoholic liver disease, liver cirrhosis, hepatocellular carcinoma. Results: The gut microbiota consists of microorganisms that educate our systemic immunity through GALT and non-GALT interactions. The latter maintain health but are also involved in the pathophysiology and in the outcome of several liver diseases, particularly those with metabolic, toxic or immune-mediated etiology. In this context, gut virome has an emerging role in liver diseases and needs to be further investigated, especially due to the link reported between severe acute respiratory syndrome-coronavirus-2 (SARS-CoV-2) infection and hepatic dysfunctions. Conclusions: Changes in gut microbiota composition and alterations in the immune system response are involved in the pathogenesis of metabolic and immune-mediated liver diseases.