Can more than two players simultaneously battle a gym?
Yes, but not in the double battle style seen in the Gameboy/DS games. Both are battling in separate battles to reduce the prestige of the gym and thus take it down.
As @Teaganator describes in his/her comment below: "You can be in the same battle instance with a teammate battling a gym. How that works it both players take damage as if they were alone, but they both deal damage at the same time."
You can also tell if you are battling with someone else because an icon will appear on the left side of the screen under your Pokemon's health that will tell you the nu
Can gym members of X and Y fight together against gym Z?
I would assume so, only because of the way I understand battling a gym as explained above. Both are trying to reduce the prestige of the gym.
Do players teaming up together have to start the battle within a window of
time or simply as long as a battle is in session?
No need to start at the same time because you aren't battling together as a unit. Just attacking the gym simultaneously.
I don't know for sure, but from what I witnesses last night, as long as the second(or subsequent) person joins while the first(or previous) is battling, they will be grouped into the same battle. Now I'm not sure if starting at the same time will cause a problem and create 2 "instances" of the battle. I would hope/assume not though.
Can you team battle at your own gym with players of the same color?
I'm going to assume instead of battle you mean train. In which case yes, multiple members of the same team can train on a allied gym at the same time.
This I do not know. I didn't test this last night. I encourage those in the comments to chime in and I can edit this part.
In the event that you and an ally remove the prestige from an opposing
faction's gym, what dictates who places a pokemon there?
Whoever gets their Pokemon in first. If you're playing with a friend or someone on your team you might want to coordinate what you're putting in. If you think you and a mutual enemy took down the gym then you want to get a Pokemon in there ASAP to claim it.
Edit Note: Last night after defeating an enemy gym, 3 players put in 3 Pokemon immediately after taking down the gym. I wasn't aware you could do this. I thought you had to put in one, increase prestige, put in another, etc. Was this a glitch? And if not could someone explain this to me?
In Conclusion:
There is no special condition when battling as a team. You are concentrating your efforts with another player to reduce the prestige of an enemy gym or raise the prestige of an allied gym faster.
Also I was REALLY wrong initially.
Also, thanks to users Theyna and Teaganator in the comments for being right when I was wrong.
Can multiple players of the same team fight their own team gym in order to raise its prestige?
Yes, however it is not like when multiple players team up to take down a gym. The training can be done simultaneously but in separate battles. Each person's training has no effect on anyone else. As if the training was being done one after the other instead of at the same time.
If you have any experience with this, then can you also include the amount of Prestige you gained for your gym and the CP of your attacking Pokemon versus the defending Pokemon in the gym.
As is outline in this answer; you get 500 prestige for defeating a defending Pokemon with equal CP values, 100 prestige for defeating it with a double or more Pokemon and 1000 prestige for defeating it with a Pokemon half the CP or less of the defending Pokemon. For CP values between half or double it will scale somewhere between those values.
What would you recommend, fighting your own team gym alone to raise it's Prestige or fight with a group (if it's possible)?
It's exactly the same either way for gyms of I think level 5 or less, but above that it becomes better to do it alone. The reason for this is that with more people helping you raise the prestige, the more levels you need to increase the gym by in order to place everyone's Pokemon in the gym. For example with two people you gain prestige twice as fast but need to level it up twice us much. If a gym was level 2 and needs 2k more prestige to the next level, you will need another 2k (after adding a Pokemon) in order to place a second Pokemon in the gym. But at higher levels this will change to be considerably more prestige so it is easier to only raise it by one level instead of multiple.
That being said, higher level gyms are harder for the enemy to take down and thus can be worth the additional effort.
Best Answer
Yes, it is perfectly possible to do this. I just used an Articuno to attack a gym, myself.
You can also use multiples of the same legendary in a gym battle. The most extreme case is shown in this video:
The trainer uses a team of 6 Articuno to attack a gym.