Gate valve is a valve where you close it by lowering a wall. Ball valve you turn it and a ball rotates and closes. Union is just a way of connecting where you can unscrew a nut and the fitting disconnects.
You have more control over a gate valve for flow control than a ball valve. Having them a union makes it easier to remove to clean or replace without cutting PVC.