You cannot miss a blue gate or go through a red gate, as it is an instant loss. At least, for your sanity, the gates color are alternated. So after a blue is a red and after a red? Yes, a blue.
The good thing is the fact that in a slalom if one gate is to the right, the next one will usually be to the left. Since you go through half of the gates, you can sometimes zip in straight lines right outside the reds and right inside the blues.
You'll have to be pretty quick to get the required time. It will take some practice to know a good path to take, since sometimes dodging a red gate to one side makes it pretty impossible to get the blue one.