Yes, rain can enter a gable vent as it is an opening on the home. Should rain get in a gable vent? No. Gable vents should be properly manufactured to prevent this in average weather.
The louvers or slats of a gable vent are usually on a 45 degree angle to persuade water to exit the vent area as soon as it tries to enter. Hurricane and tornadic weather with high winds or even straight-line winds do not qualify for this natural protection. Brute force winds cannot be stopped or predicted for the upward force they will push air and water with. So on some occasions water may enter the attic from a gable vent no matter the preparations.
Having a screen on the rear of the gable vent can also help deter water infiltration. Water hitting a screen will either trap the water if it's moving slow enough and allow it to drip straight down. Fast air forced rain will hit and splatter into smaller droplets. This usually creates more of a mist that will dry quickly. The pooling water below a vent is the problem child of these storms. Pooling water takes too long to evaporate and will soak into the attic timbers and flooring causing rot.
In areas where storms are prominent, using a gable vent with a built-in drip pan can help. This will collect the rain at the bottom of the vent in a built-in pan for it to safely sit until it evaporates. For dripping water, this works great. But rain blown through can still enter the attic and pond on the floor.
If water is still blown into the attic continuousely, placing an actual pan or bucket below the vent can also create a safe space for the water to evaporate without rotting out the floor below the vent. And, before you think that soffit vents are ammune to this water infiltration or even roof vents, they too are openings prone to allow water to enter when blown with enough force. But they have no where to place a drip pan to protect the attic.