Now training works just like battling rival gyms. You can form a team of six go up against your fellow teammates, making it much easier to beat the entire gym.
How does the new training work?
Training with your six is just like battling an opposing team. Tapping on a gym will bring up the option to battle. Start the battle by tapping on the glove icon in the bottom right-hand corner. Then, the game will suggest six Pokemon to use in the training battle. If you don't like the picks, tap on the Pokemon you want to change and choose a new one from the list.
Pro tip: Before you choose your team, scroll through the Pokemon in your gym and take note of their CP and type. Then, choose your six. For example, if the first Pokemon is a 1,300 CP Vaporeon, choose an electric type with a similar or higher CP as your first Pokemon.
Once you're satisfied with your lineup, tap the Go button at the bottom right side of the screen and battle as usual.
What does training affect?
Though some people have speculated that Pokemon will be able level up when new training features are introduced, it hasn't happened with this update. When you beat a gym you only get XP and gym prestige.
Does Niantic give you a fair fight?
In the update notes for the 0.41.2 for Android and 1.11.2 for iOS update, Niantic says, "The CP of the Pokémon you are battling may be temporarily adjusted lower for your training session." This would be a great feature for new trainers with low CP Pokemon since most gyms are guarded by Pokemon with very high CPs.
How to use the new gym training system for max prestige
With the latest update, it got a lot easier to train friendly gyms in Pokémon GO. Below is a video by TrainerTips which will show you how the new system works, and how you can use it to gain the most possible prestige with each training session.