I've recently had a retainer wall built in the landscape using the dry-stack method (see photos). Unfortunately, there has already been two occasions within past month of gopher activity behind the wall which has caused the soil to spill out onto the patio. I would like to seal the crevices between the stones with concrete to keep the gophers from pushing the soil outward. I'm not sure if portland cement or posthole concrete would be preferable. Although there isn't a french drain behind the wall, I don't think that drainage will be a problem as there should be plenty of smaller weep cracks for water to drain.
Don't even try:
Dry stone walls are designed to shift slightly with the weather and with freeze/thaw cycles. They also drain freely, and, barring getting damaged by a falling tree or an earthquake, will last a hundred years with little or no maintenance.
There should be no soil between the stones, so either your contractor screwed up, or your gophers are particularly athletic.
Trying to pack inter-stone spaces with cement / foam / whatever is a losing proposition -- the cement will flex and crack and look pretty terrible within a few years, yet your gophers will be able to get through the smaller holes.
Instead, I'd recommend sweeping up any soil, applying fox urine, and encouraging local snakes to take up residence in your stone walls. Barring that, you could also invest in a bunch of gopher traps.
Alternatively, you could dig out behind the stone wall and backfill it with small rocks so the soil is not directly against the wall. This will prevent the gophers from pulling the soil through the wall. But this would involve digging up your garden.
So, I'd suggest just living with it.
Consider one of the landscape or post-hole expanding foams. (example)
I've never used it, but it looks handy. Nice looking retaining wall!