In North America they're called cattle guards, or Texas gates, and they are everywhere (where I'm from at least). They're intended to replace a conventional gate by discouraging livestock from crossing, while also accommodating vehicles by not making them stop to open and close a gate door.
They are treacherous for cattle, who have to learn not to attempt to cross them. A cow or other large animal can easily get stuck or hurt in a cattle guard, and if left unaided, they can prove fatal:
Cattle Guard for cyclists to cross (Explicit content, mouse over to view):

Bull that attempted to jump a gate (Explicit content, mouse over to view):

Cattle guards are used to keep cattle out of fields as much as they are to prevent them from escaping. Aside from destroying the planted fields, cows can also die if they eat certain crops. Wheat for example is something that cows can't digest properly, if a cow gets out into a wheat field and fills up on grain, they'll bloat up and die a horrible painful death.
Interestingly enough, cattle guards are so common out here that some people can even get away with simply painting them on the roads:

Cows that are familiar with cattle guards are easily fooled by the faux gate. They won't even attempt crossing the painted lines. The painted gates are also used for speed control on paved roads. All the drivers out here are familiar with cattle guards and know to slow down to cross them (they can be pretty rough on your vehicle, like multiple speed bumps in a row).
I'll never forget the first time I encountered a painted gate, we rounded a corner going faster than we should have been going and hammered on the brakes in a panic when we saw it. We were confused for a moment after we rolled smoothly over the lines without the jarring rapid fire hits to our suspension, it's hard to tell a painted gate from a real one when you're going fast.