The gut heals quickly when damage stops and the nutrients we need are readily available. Healing a leaky gut always starts with stopping the damage. Other than an infection of the gut, as a medical doctor and naturopath in my practice I've found that the primary causes of gut damage are NSAIDs (nonsteroidal anti-inflammatory drugs), acetaminophen, excessive alcohol, and consuming foods to which a person is either allergic or intolerant.
Most people don't realize that some foods damage their gut because the effects can happen hours after eating. Of course, immediately getting hives from eating a food makes such allergies obvious. But the ones that don't immediately cause symptoms are very hard to recognize. And to make matters more complicated, problem foods are unique to each individual. However, after seeing hundreds of patients with leaky gut, by far the worst foods I have seen are, in decreasing order, wheat (including rye and barley), dairy, peanuts, soy, corn, and tomatoes.
The best foods for the gut are those rich in nutrients that promote healing and foods that either inhibit toxic bacteria in the gut or promote the growth of bacteria that are good for the gut.