The horse ran through the fence between pasture and corral next to barn.?

The sentence is grammatically correct, but it could be improved for clarity and flow. Here are a few ways to rewrite it:

More concise:

* The horse broke through the fence separating the pasture and corral near the barn.

* The horse ran through the fence between the pasture and corral, near the barn.

More descriptive:

* The horse, a blur of brown and white, bolted through the flimsy fence separating the pasture from the corral, leaving behind a trail of splintered wood and startled chickens near the barn.

Adding context:

* Panicked by the sudden thunderstorm, the horse ran through the fence between the pasture and corral next to the barn, seeking shelter.

The best way to rewrite the sentence depends on what you want to emphasize.