
It might. Scientists have found an association between gallbladder stone disease and an increased risk for organic erectile dysfunction (caused by physical conditions, like poor blood flow to the penis). However, no association was found between gallbladder stone disease and psychogenic erectile dysfunction (caused by psychological issues, like anxiety or stress).
Most cases of erectile dysfunction (ED) in men older than 40 are organic or of combined origins.

The gallbladder is an organ that stores bile produced by the liver, which is located just above it. (Bile is fluid that helps the body digest fat.) When needed, the gallbladder pushes bile through tubes called bile ducts into the small intestine.
Gallstones are hardened “stones” formed by substances found in the digestive fluid, such as cholesterol. Sometimes, stones get stuck in bile ducts, and this can become quite painful.
Gallstones may be treated with medications or by surgery to remove the gallbladder.

In a March 2019 study in the American Journal of Men’s Health researchers compared data from 9,362 men with gallbladder stone disease to data from the same number of men without gallbladder stone disease. They found that men with gallbladder stone disease were at higher risk for organic ED, especially if they were age 65 or older or had associated health conditions.
However, ED risk fell for men who had their gallbladder removed.
The researchers noted that gallbladder stone disease and ED share some risk factors, such as heart disease. For example, cholesterol can contribute to both gallstone formation and atherosclerosis (hardening of the arteries), which can block blood flow to the penis and lead to weak erections.

Men can lower their risk for gallstones by maintaining a healthy weight through proper diet and exercise. Weight loss should be achieved slowly, as quick weight loss can actually increase gallstone risk by raising cholesterol levels.
Certain medications, like cholesterol-lowering drugs, may also help prevent gallstones.
Resources
American Journal of Men’s Health via US National Library of Medicine
Chen, Chien-Hua MD, et al.
“Erectile Dysfunction in Men With Gallbladder Stone Disease: A Nationwide Population-Based Study”
(Full-text. Published online: March 24, 2019) https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6440063/
EverydayHealth.com
Marks, Hedy
“4 Ways to Prevent Gallstones”
(Last updated: December 3, 2018)
https://www.everydayhealth.com/gallbladder/4-ways-to-prevent-gallstones.aspx
Rodriguez, Diana
“What Is the Gallbladder and What Does It Do?”
(May 3, 2018)
https://www.everydayhealth.com/gallbladder/guide/
Mayo Clinic
“Gallstones”
(March 13, 2018)
https://www.mayoclinic.org/diseases-conditions/gallstones/symptoms-causes/syc-20354214
MedlinePlus
“Gallstones”
(Page last updated: May 7, 2019)
https://medlineplus.gov/gallstones.html
WebMD
“Erectile Dysfunction: Psychological Causes”
(Page last reviewed: September 11, 2017)
https://www.webmd.com/erectile-dysfunction/guide/ed-psychological-causes