Yes, but only occasionally: the Nevada Department of Wildlife says Great Basin gopher snakes “occasionally consume rattlesnakes,” so rattlesnakes are an uncommon meal rather than a staple.
Gopher snakes eat a wide range of animals, mostly small mammals, birds and bird eggs, lizards and other snakes. They are large and non-venomous, so they subdue prey by constriction instead of a venomous bite. They are mostly active during the day and hunt by searching burrows, rock crevices and other sheltered spots where prey hides, which makes them useful for keeping rodent numbers down, including in urban areas. They are often mistaken for rattlesnakes: when threatened, a gopher snake flattens its head so it looks bigger and more like a rattlesnake, which helps scare predators away. The relationship can also run the other way for gopher snakes in general, since birds of prey, coyotes, kit foxes and sometimes kingsnakes eat them. Great Basin gopher snakes live about 10 to 15 years and lay clutches of roughly 2 to 20 eggs.
Source: Nevada Department of Wildlife, Great Basin Gopher Snake
Image: Gopher snake, NPS Photo, public domain, via Wikimedia Commons.