Apparently many potential predators, and people, mistake gopher snakes for rattlesnakes and leave them alone. Gopher snakes feed primarily upon rodents including kangaroo rats, woodrats, ground squirrels, gophers, pocket and white-footed mice. Birds are also eaten. I have encountered these snakes in Joshua trees in the Mojave Desert and palo verde trees in the Sonoran Desert. Presumably they had climbed the trees in search of active nests with eggs or young birds, both of which they are known to eat.
Death results from suffocation.
Gopher snakes usually encounter rodents in their burrows and find them primarily through scent tracking. Although desert-inhabiting gopher snakes may be abroad in the morning in early spring they quickly become nocturnal as they season warms. When found active on the surface in April and May, gopher snakes are usually searching for mates. The olfactory sense is used to locate a female. By flicking his tongue against the ground he seeks to find and follow a scent trail laid down by a female.