That awesomely awesome thing was a Critical Capture, as everyone else said, introduced in Black & White, which significantly increases the rate of capture. You'll know it's a Critical Capture by the distinct metallic sound it makes as you throw it. Then one shake, and the Pokemon's yours. The more Pokemon you catch, the better your chance of it happening again. I used to get them like every 5th throw in Black 2 after I transferred all 500+ of my Pokemon from White. I've rarely ever seen a Pokemon escape from one, for me only once with Kyurem.
On another note, I got my first Y Version Critical Capture yesterday. I didn't even realize they were brought back until it happened! xD