I have realised, from reading different resources, that Gally didn't get in there on purpose, he was in fact controlled by the labs because of that microchip that is still in his brain.
I believe that he was manipulated by WICKED to go through the maze that he didn't know even the first few hundred metres of, and he was manipulated to run the maze. HE then found that there was dead Grievers laying around near the exit and slipped past while there was a 'quite' period, he was manipulated to pick up and amputate a 'key' which is the device to open the door to the 'Griever Hole' and he was forced to enter the sector sequence that he didn't already know by WICKED (they controlled his every movement) and he was controlled to got through the Griever Hole a little while after the other main Gladers went through.
He then was controlled in which direction he was going through the long corridor after the Griever Hole, he could not control anything that he was doing, he then pushed open the edit door to find the laboratory, where he found the other Gladers about to fully escape.
he was forcibly controlled to pick up a revolver from a dead scientist (or in the book it is a knife) and he didn't want to do any of this but he was being controlled to.
He demanded that everyone belongs in the maze and says some other stuff about belonging in the maze, then he (he already had the revolver poised) went to shoot (he was manipulated to do this as he did not want to kill or even harm any of his friends, they were his family) and Chuck was manipulated to jump in front of Thomas and was shot in the chest (or in the book he was stabbed by the knife) and in the movie Mihno threw a spear into Gally's heart, but in the book, Thomas jumps on top of him and nearly beats Gally to death, meanwhile Gally in his head was shouting "I'm sorry, I'm sorry I didn't mean to do any of this' and then he thought "maybe I do deserve this, maybe this is something that I have deserve for a long time":
"I'm sorry, I'm sorry I didn't mean to do any of this' and then he thought "maybe I do deserve this, maybe this is something that I have deserve for a long time"
and this is when it stops. Gally didn't like Thomas from day one, but every time when Gally tried to tell the others an idea, he is shot down in flames, he has tried for a very long time to get everyone out of the maze to safety and alive as he cared about everyone, but when Thomas came, Thomas was leading and it tore Gally in half and he snapped and decided that enough was enough.
WICKED found out about this and took it to their advantage and manipulated Gally to try to kill Thomas on their immediate escape, but Gally is the one who is shot down in flames. This
This I believe is what happened and how he got in.