To learn the gainer, make an aggressive cut out, as you get close to being even with the boat, turn in and try to be travelling in a parallel path with the boat. If your cut was hard enough, you'll get just a little slack in the rope. Now it's time to dip, jump, and flip. That little bit of slack should keep line tension from pulling you off axis. As you progress, you can start throwing it with line tension, which will make it higher.
Check out www.foilfreaks.com
and click on tutorials for more info on both rolls and gainers.