Bladder spasms can be caused by various factors, including urinary tract infections (UTIs), bladder irritation, and interstitial cystitis. In gynecology, these spasms may also be associated with conditions like pelvic organ prolapse, endometriosis, and post-surgical recovery, particularly after procedures involving the bladder or surrounding organs.