At first it seems like Neville is an unlikely candidate for Gryffindor even though, like Harry, he's a lonely orphan who's excited to make friends at Hogwarts. He's timid, forgetful, and an easy target for bullies. He's always losing his pet toad and ending up in the wrong place at the wrong time. Poor Neville is an easy mark for the cruelties of Malfoy and his gang. Harry, Ron, and Hermione often help Neville out, even though it sometimes gets them into trouble.
Yet Neville is a good, loyal friend who does show courage and bravery, the big traits of Gryffindor house. When McGonagall catches him out of bed in the middle of the night, it's because he's trying to find Harry and warn him that Malfoy is on to him. When he runs into the three friends on their way to breaking the rules and looking for the Sorcerer's Stone, he tries to stop them, for their own good. Neville spends much of the book getting hurt or screwing up – breaking his wrist during flying lessons, being put under the Body-Bind curse by Hermione – but he never gives up. He just keeps muddling through.