The easiest, but most tedious, way to do it is to save in front of it, then start the battle and use a Quick Ball. If it doesn't work, reload and do it again. Sooner or later, it'll work.
The better way to do it is to set your team up with a catcher or two. Magneton or Magnezone are good, since they can learn Thunderwave (paralysis increases catch rate) and they're pretty bulky. Anything that learns a paralysis move or a sleep move is good, but it has to be bulky, since legendaries hit hard. And a pokemon that learns False Swipe is handy, since that'll never knock a pokemon below 1HP. Samurott, Leavanny, the Axew line, the Pawniard line and the Karrablast line can all learn it. So can Cobalion, Terrakion and Virizion, and they actually make really good catchers, since they're tough. But you have to catch one of them first of course.