Gate valves tend to be less expensive than ball valves, but are more susceptible to corrosion. Over time, the internal stem that connects the knob to the gate becomes increasingly likely to fail. They are often used with larger pipe diameters of two inches and up.
Ball valves are more effective at forming a tight seal and have more reliability and longevity than gate valves, but tend to be more expensive. They are often used for shutoff and control applications.
Because ball valves can open and close immediately, they are more likely than gate valves to cause water hammer. When a valve is quickly closed on water moving at high pressure through pipes, it can cause shock waves through the plumbing that create a hammering sound. Under high enough pressure, water hammer can cause a pipe to weaken and break. For that reason, users are advised to turn the ball valve lever slowly to avoid water hammer.