A ticket was a card or slip of paper used to gain admission to a location or event.
Wesley Crusher and a desk sergeant got two tickets to a dance for the next day. (TNG: "The Big Goodbye")
As a metaphor, Dal R'El timed the motion of a Tars Lamora mining lift precisely as a means of escape, referring to it as his "ticket out of here." (PRO: "Lost and Found")