Hepatocellular carcinoma (HCC) is a primary liver cancer that occurs with a frequency of 85% in patients with liver cirrhosis. It is the sixth most common type of cancer globally. Asia is the continent with the highest incidence (72%), followed by Europe (8%) and Africa (5%). Men are four times more likely than women to develop this cancer, especially in the 70-80 age group. Risk factors include alcoholic liver disease, tobacco use, genetic predisposition, dysmetabolic comorbidities such as type 2 diabetes mellitus and obesity, hepatitis B virus and hepatitis C virus infections, and non-alcoholic fatty liver disease. Unhealthy dietary regimens and gut dysbiosis are additional risk factors that have been recently investigated. These two factors are closely related because the gut microbiota performs several biological functions, including nutrient metabolism, a process that promotes gut homeostasis, known as eubiosis. With regard to the correlation between diet, gut microbiota, and HCC development, there are several mechanisms that have not yet been fully elucidated. This narrative review aims to evaluate the impact of diet and gut microbiota changes in the development of HCC. Our analysis, performed on several clinical and pre-clinical studies, showed that a high-fat diet promotes gut dysbiosis and hepatic fat accumulation, leading to the progression from simple steatosis to HCC, while the Mediterranean diet, rich in fiber and monounsaturated fatty acids, had a protective role. For this reason, international employment of this dietary regimen for therapeutic purposes should be encouraged.