Gophers are notoriously difficult to get rid of. They burrow a foot or two below the surface and pop up all over. To add insult to injury they dine on many of the things we like to plant in our garden. We'll discuss the various methods to rid your yard of gophers, ranging from humane to lethal.
First of all, let's identify the creature. There are more than one type of burrowing rodents. The two most common are gophers (aka pocket gophers) and moles. You can tell the difference by how they mound their dirt. Gophers push their excavated dirt out through a hole and off to one side. A gopher mound always has most of the dirt on one side. On the other hand a mole pushes out the dirt and makes a cone, with their hole right in the middle, like a little volcano.
Since gophers are a force of nature, you might focus on protecting your garden rather than eliminating gophers. This option involves using wire mesh to create barriers to gophers. If you are installing a new lawn, consider the first layer, before soil amendments and compost, put down galvanized hardware cloth. It should be no more than six inches under ground and any digging that may be needed, such as trenches to install irrigation should be completed first. This will prevent the gopher from coming up through your new lawn. Instead they will hit the wire and be forced to go elsewhere.
To protect flower beds, it may not be practical to bury hardware cloth because of the occasional digging you will need to do when planting. You could bury the metal mesh deeper, but that might result in the gopher moving in above the metal and doing even worse damage to your garden. Another option is to instead trench around a garden to the depth of 24 inches allowing you to place a vertical barrier around the garden. A drawback is that for it to be fully effective the cloth must extend above the ground - ideally by 12 inches. Also, while gophers burrow mostly in the one to two foot zone, they have been known to go a few feet deeper. This fencing will likely reduce gopher traffic but cannot guarantee completely stopping them.