People have been doing it this way horse back for a long long time ;-) . Usually calves stay in the pen and the cows are sorted off the calves. Cows naturally look for the "hole" and will slip by if you let them. Calves may try and slip through with their momma, but a small motion towards them or in between them and their mother, will keep the calf at by while the momma cow goes by.
Typically you have someone horseback sorting, and a couple guys in the pen, horse back, trickling cattle to the man sorting. Sorting is a lot of fun if you like being horse back and your on a horse that sorts well.