The greenhouse effect is primarily caused by carbon dioxide (CO2) in the atmosphere, which traps infrared radiation emitted by Earth's surface and re-radiates it back, warming the planet. While water vapor contributes, CO2 from human activities is the dominant driver of enhanced greenhouse effect.