The gut flora plays an important role in the pathogenesis of the complications of cirrhosis. Hepatic encephalopathy (HE) represents a broad continuum of neuropsychological dysfunction in patients with acute or chronic liver disease and/or porto-systemic shunting of blood flow and it manifests with progressive deterioration of the superior neurological functions. The pathophysiology of this disease is complex, as it involves overproduction and reduced metabolism of various neurotoxins, particularly ammonia. Management of HE is diversified and requires several steps: elimination of precipitating factors, removal of toxins, proper nutritional support, modulation of resident fecal flora and downregulation of systemic and gut-derived inflammation. This review will provide an overview of gut barrier function and the influence of gut-derived factors on HE, focusing on the role of gut microbiota in the pathogenesis of HE and the recent literature findings on its therapeutic manipulation.