A ball valve is superior to a gate valve and only costs a few dollars more. So, whenever you have the opportunity to install a valve, it’s a good idea to use a ball rather than a gate. They install in the same way, so really it is silly not to spend a few more dollars and get a superior part.
If you already have a gate valve installed and have to replace it, you can certainly replace it with a ball valve. You will need a torch to heat up the parts and remove them.
Turn the water off and drain it from the pipe and valve. You will want to open the valve as well. Heat up the area where the valve joins the pipe. You can grab the valve with large channel locks or the like to see if it will move. If it does, it is hot enough to remove. You may find it easier to cut the pipe and pull off the valve, otherwise you may heat up a nearby elbow and give it some lateral movement.
Reinstalling the new valve requires that you clean, flux, and heat up the joints so you can solder them. If you have cut the pipe, you can use a repair coupling over the cut and solder that on just like the valve. Always leave the valve in the open position when applying the heat.