It depends on how you are getting to the base (Tal) station.
The Zugspitzbahn train leaves adjacent to the German Rail station in Garmisch-Partenkirchen. You change from the regular train to the cog train in Grainau. The fastest way to the top is to get off the cog train in Eibsee and take the cable car up to the top of the mountain.
The cable car station in Ehrwald is a distance from the train station. There are buses periodically during the day. I don't think the schedule is real wall coordinated with the train.
If you arrive in GaPa with a Bayern-Ticket, you might get a discount for the Zugspitzbahn ticket (it used to say so, but I no longer see the discount mentioned).