According to the University of Maryland Medical Center website barberry has been used for over 2500 years to treat gastrointestinal complaints and lower fever. In Iran it’s now being used medicinally for gallbladder disease and heartburn. The active component is berberine, which is found in barberry and goldenseal. In test tube studies (meaning not tested on live humans or animals) berberine has yielded antimicrobial activity against parasites and bacteria, anti-inflammatory and blood pressure lowering properties, in addition to sedative and anti-convulsive benefits. Berberine/barberry has quite a few contraindications, especially for pregnant women and the UMD website tells us it shouldn’t be taken for more than a week without the supervision of a doctor .
A 2009 study published in Fitoterapia, the Journal for the Study of Medicinal Plants, found that extracts of berberine could reduce epithelial gut permeability in vitro using human cells .
A number of other studies have come to similar conclusions based on test tube (in vitro) studies, including one published in the European Journal of Pharmaceutical Sciences in 2010 .
Authors of an interesting but scary sounding 2014 study in the Journal of Marine Drugs used a nano carrier based on chitosan and fucoidan to deliver berberine locally to restore barrier function compromised by bacteria-derived lipopolysaccharides (LPS) which play a role in IBS and other inflammatory bowel conditions .
The studies I’ve read explain that berberine works by strengthening/protecting the intestinal epithelial tight junctions which prevents bacteria and others from coming into contact with the immune system.
A comparative study of berberine on colitis in rats rounds up quite a bit of information pointing to its benefits in treating inflammatory bowel changes . In this vein moringa oleifera , caraway  and rosemary oil  have also been found to be beneficial.
I didn’t come across too many studies on barberry/berberine as an antihistamine, just one of interest from 1999 published in the Journal of Ethnopharmacology . The University of Maryland website says that barberry may increase the effects of antihistamines so please do take that into account when speaking with your doctor.
I’m in love with medicinal foods. At this point in my life I’ve finally managed to let go of the reigns and just enjoy the fact there are studies out there showing that X food has X beneficial property rather than spend hundreds of dollars monthly compromising my liver/kidneys as they struggle to clear massive amounts of exotic supplements.
I believe that part of my success with healing comes down to eliminating the stress of finding, paying for and testing new supplements in favour of a more “organic” approach. Like sticking the barberries into a gluten free cake, but if you’re still in the early stages of trying to heal your gut, baked/sweet goods probably shouldn’t be on the menu right now.
My muffin recipe was used as a base and then added in half a cup of barberries to make this fruit cake. I also enjoy a cup of barberry tea brewed with a tablespoon of dried barberries!