The now common term ‘leaky gut’ essentially refers to intestinal permeability. In the lining of the small intestine cells join together to create what is called a tight junction. These tight junctions form an impenetrable barrier to protect the sterile bloodstream from the contents of the gut. A healthy gut breaks food down into low molecular weight particles small enough to cross the tight junctions. Signaling proteins open and close the tight junctions as necessary to regulate the transport of nutrients into the bloodstream.
Leaky gut happens when these tight junctions weaken (commonly the result of inflammation of the digestive tract) and allow large, improperly digested proteins, bacteria, fungus, and other pathogens to cross the intestinal wall. As these proteins pass through the leaky gut they inflame the intestinal wall and cause a buildup of mucus. The mucus prevents low molecular weight nutrients from crossing but doesn’t keep out the larger, heavier undigested proteins. The consequence is both leaky gut and poor absorption of nutrients.
Because pathogens don’t belong in the bloodstream, they alert the immune system to attack and destroy. When a person has leaky gut the immune activation is constant, which may lead to inflammation causing pain, food sensitivities, rashes, brain health issues and other imbalances. Because inflammation contributes to leaky gut, it becomes a self-perpetuating vicious cycle between the two.
Leaky gut and the brain
Research shows that leaky gut can lead to autoimmune attacks in the brain, as the chronic inflammation leaky gut causes makes the immune system overzealous. Leaky gut increases the production of inflammatory cytokines (immune messengers), which activate the brain’s specialized immune system thereby altering how well neurons function and speeding brain degeneration. Moreover, the brain is protected by its own blood brain barrier that has the same tight junction structure as your intestinal lining. The same mechanisms discussed below that cause gut lining permeability can also degrade the blood brain barrier, promoting inflammation of the brain.
Leaky gut has also been shown to play a role in depression by altering neurochemicals in the GI tract, which then impact brain chemistry, and by allowing harmful bacteria into the bloodstream. These bacteria carry in their membranes lipopolysaccharides (LPS), large molecules that trigger inflammation. LPS inflame the gut wall and once in the bloodstream, cause inflammation throughout the body, which can also impact brain chemistry and contribute to depression. This mechanism is called the cytokine model of depression because it is associated with inflammation instead of neurotransmitter deficiencies (for which antidepressants or amino acids may relieve symptoms). 
Risk factors for leaky gut
If you eat a diet high in fried foods, processed foods, gluten and dairy with little consumption of fresh fish, raw nuts and seeds, and vegetables, you’re at risk for developing leaky gut. Basically, an inflammatory diet promotes leaky gut. In particular, clear evidence links gluten with intestinal inflammation and leaky gut.  Excess alcohol also produces reactive oxygen species, which induce intestinal leakiness. 
Chronic stress is another major risk factor for developing leaky gut. The constant release of stress hormones suppresses immunity and inhibits blood flow and oxygenation of the intestines, leading to intestinal permeability. 
Additional factors include:
Intestinal inflammation from infection (parasite, bacterial or viral), can break down the proteins that keep the intestinal junctions tight.
The use of antibiotics and other medications can lead to intestinal permeability.
Deficiencies in hormones such as testosterone, estradiol, progesterone, or thyroid may promote intestinal inflammation and reduce intestinal regeneration, leading to permeability.
Glycosated end products from high blood sugar associated with diabetes can destroy intestinal tight junction proteins.  (When you have sugar molecules in your system, they attach themselves to fats and proteins in a process known as glycation. This forms glycosated end products, which cause protein fibers to become stiff and malformed.)
Autoimmune diseases increase cytokines that activate a pro-inflammatory enzyme called iNOS. iNOS destroys the proteins that hold the tight junctions together, leading to intestinal permeability. 
Progressed neurodegeneration or a brain not firing well into the vagus nerve, the cranial nerve that connects your brain to your body, can cause leaky gut
Symptoms of a leaky gut
How do you know if you have leaky gut? You may have mild to moderate gastrointestinal symptoms, such as bloating, gas, abnormal bowel movements, systemic inflammation, and food sensitivities. You may also have developed reactions to foods that include skin rashes, headaches, abdominal pain, joint pain, body aches, swelling or bloating. If leaky gut is inflaming the brain, this may cause depression or brain fog thanks to decreased nerve conduction. Systemic inflammation from leaky gut can impact energy levels and cause fatigue, poor muscle endurance, or poor recovery from injuries.
The key to unwinding leaky gut is following an anti-inflammatory diet. Supplementation with nutritional compounds that help reduce intestinal inflammation and repair the intestinal membranes, such as quercetin, luteolin and apigenin, can also help.
Testing for leaky gut
It's important to know that leaky gut can persist for some time without causing any particularly noticeable symptoms. If this is the case, the body and the brain are being subjected to chronic inflammation that eventually compromises long term health. To know for sure if you have leaky gut, ask for a simple blood test measuring the following antibodies (an antibody is a marker produced by the immune system that tags a foreign substance for destruction).
Zonulin and occludin antibodies: As the gut becomes inflamed and breaks down during leaky gut, the immune system makes antibodies to zonulin and occludin. Zonulin is a protein that opens up the tight junctions of the intestinal wall, thus regulating how permeable the gut is. For people with celiac gluten triggers zonulin to open these junctions, thus promoting leaky gut. Zonulin also opens the junctions in the blood brain barrier for those with celiac. (Importantly, many researchers believe zonulin release isn’t specific to the celiac population. Some research shows that gluten opens these junctions in all people.) Occludin is another messenger protein that regulates intestinal permeability. Elevated zonulin-occludin antibodies are a marker for leaky gut, and because blood brain barrier has zonulin and occludin as well, could also indicate a leaky blood brain barrier. 
Actomyosin antibodies: Actomyosin antibodies are another indication of intestinal destruction. Actomyosin is a complex of proteins that makes up muscle fibers and contributes to muscular contractions. Antibodies to actomyosin signal a breakdown of the membrane lining of the digestive tract and hence leaky gut. Actomyosin antibodies indicate gut damage is severe enough to break through the cells, not just open the spaces between cells, a type of damage that takes longer to repair.
LPS antibodies: LPS is the compound in the membranes of harmful bacteria that trigger inflammation. Immune cells in the mucosal lining don’t interact with LPS unless the walls are breached due to leaky gut. In addition to leaky gut, LPS antibodies can also signify gut flora dysbiosis, or the overgrowth of harmful bacteria in the digestive tract. If LPS antibodies are in the bloodstream systemic inflammation is at play. In this situation LPS also may have breached the blood brain barrier, causing inflammation in the brain.