Most doctors recommend surgery if you have had repeated attacks. If you have had one attack of gallstone pain, you may want to wait to see whether you have more. Surgery is the best way to prevent gallstone attacks. The surgery is very common, so doctors have a lot of experience with it.