The camera shows the back of the craft as Bishop takes off, but you don't see any sign of the queen holding on or moving up the ramp.
UD-4L Cheyenne Dropships have three landing skids; one rear and two fronts. The loading ramp descends (facing) forward of the rear and between the two fronts. The personnel stairway lowers on the port side, which we see is no longer extended once Bishop begins his take off and then gets stuck. Prior to this he's hovering adjacent to the landing pad, during which he's only a few feet directly above it. The entire time, the ramp is not extended but all three gear are.
Looking at it from behind, we can see that she stowed herself inside the bay of the rear landing gear. She never goes up nor comes down the loading ramp or the stairwell.
The camera does not show the back of the craft or the aft landing skid when the front left one gets caught, which we are too busy looking at. That is when she has an opportunity to climb up the rear one. We never see it happen on-screen but from where she descends leaves little else as a possibility.
What we do see, about two minutes earlier, is their capacity for critical thinking, when she does a "Oh, so that's how it is, eh?" head tilt just before boarding the second elevator and figuring out how to use it. Quietly gaining passage off the now-flaming-rock is probably a good idea too, because the last time one of them took out the pilot it didn't go so well.
This is addressed in the film's novelisation
She jumped onto the loading boom and hung on as it retracted into the dropship’s cargo bay. An instant later a tremendous explosion tore through the station. The resultant wind shear slammed the hovering craft sideways. Extended landing legs ripped into a complex of platform, wall, and conduit. Metal squealed against metal, the entanglement threatening to drag the ship downward.
Inside the hold Ripley threw herself into a flight seat, cradling Newt against her as she strapped both of them in. Glancing up the aisle, she could just see into the cockpit where Bishop was fighting the controls. As they retracted, the sound of the landing legs pulling free echoed through the little vessel. She slammed home the latches on her seat harness, wrapped both arms tightly around Newt.
The queen had concealed herself among the landing mechanism inside one strut bay. The atmospheric plates that normally sealed the bay flush with the rest of the dropship’s skin had been bent aside or ripped away. She’d blended in perfectly with the rest of the heavy machinery until she began to emerge.
In the film you see the lander blown sideways into the platform and hear an alien scream. This, presumably is when the Alien Queen was able to pull herself up into the strut bay.