Cranberry pills will help prevent-- but they will not cure one. Only way to cure is antibiotics, and making sure it's gone completely after all antibiotics have been taken.
There is a supplement I've used before to take with the antibiotics with great results. It's called Resources Urinary Tract Support.
My pup had bladder infections when I first got her that were pretty bad. She did 2 courses of antibiotics about 10days each time. The first round wasn't strong enough so that's why it came back. The second round worked though. I started giving her cranberry extract power (Cranberry Relief by NaturVet) everyday since then as a preventative measure. I don't really know if it works but she hasn't had another one so I'm hoping it's helping!