Ok, the gyms are set up the same as normal 6-6 OU battles
You can battle the gym leaders any number of times they will allow within a given day or week.
All that needs to be done is have a time set up for the gym battles.
As soon as you win 1 battle against the leader you get the Trophy from that gym, trophies are used in B.A.L.D. badges are used in BABA Gym