Gally throws a knife at Thomas in "The Maze Runner" because he believes that Thomas is responsible for the chaos and the danger that has been happening in the Glade. Gally thinks that Thomas is disrupting the order of the Glade and putting everyone in danger. He sees Thomas as a threat to their survival, and he wants to eliminate that threat.