It sounds like your vet is keeping you filled in on causes and treatments.
Gallstones in dogs are composed of bilirubin unlike human stones which are made up of cholesterol.
Bile and bilirubin is produced in the liver and stored in the gallbladder which then passes the bile to the small intestine to aid in digestion of food. The gall bladder is also attached to the pancreas.
If the gallbladder is not functioning properly it will almost always cause problems with the liver.
If the pancreas is swollen or has a tumor then that can block the bile duct leading to the gallbladder being overly full of the bile and bilirubin leading to a build up of sludge in the gallbladder or the formation of a biliary mucocele or 'stone'. You may have done an experiment as a child where you made a supersaturated solution by stirring a lot of sugar into water and then had crystals form. If the fluids get trapped in the gallbladder the same thing can happen where the compounds drop out of the fluids and make sludge or stones.
Surgery is needed in the situation where there is a biliary mucocele or if there is sludge or a tumor that does not respond to medical care. The gallstones can be surgically removed which is what your vet is suggesting or if need be the gallbladder can also be removed without hurting the life of a dog. A dog can live without a gallbladder, just as a human can. You can read about gallbladder surgery here
http://vetsurgerycentral.com/gallbladder.htm
Hope this helps you!
Dog Expert:Rescue, Train,Breed,Care
30+ yrs dog home vet care & nursing, rescue, behavior&training, responsible show breeding, genetics