So, students in Gryffindor are supposed to represent bravery. How does Neville represent bravery, to the point in being accepted into the house. I've always thought of his strongest traits being things like loyalty, willingness to work hard, etc, and these things would tend to put him in Hufflepuff.
First of all, in the first 4 years, it isn't really shown that Neville is NOT brave - the only thing he's really afraid of is his Grandmother and maybe Snape during Potions. With good reason. :)
You may be confusing a lack of confidence/assertiveness with not being brave, but they are not the same (for a good in-universe illustration of the opposite, think Prof. Lockhart).
First four books, he's clumsy, and is not yet showing any magical talent.
Starting with the fifth year, Neville is shown to have been changed, and repeatedly proves his bravery and willingness to fight.
NOTE: He first shows bravery in the First Year (see System's great answer for details), but the real Gryffindor-y Neville emerges in the Fifth year.
There's another instance of him showing a Gryffindor quality - more specifically, integrity. He argued with the Hat to sort him into Hufflepuff (src: Pottermore), because he felt he wasn't brave enough to be a Gryffindor.
He joins DA
He shows marked and significant improvement in his magical abilities while in DA
He voluntarily joins the DA members who accompany Harry to Ministry of Magic battle in the end of OoP, even arguing with Harry about it:
Neville: "We were all in the D.A. together. It was all supposed to be about fighting You-Know-Who, wasn't it? And this is the first chance we've had to do something real — or was that all just a game or something?"
Harry: "No — of course it wasn't —"
Neville: "Then we should come too. We want to help."
During the battle at the Ministry, he refused to leave as per Harry's suggestion after Dolohov broke Neville's nose and wand.
When being threatened and tortured by Death Eaters, he told Harry not to give them the Prophecy
- participated in the Battle of the Astronomy Tower. Along with Luna Lovegood, he was the only member of Dumbledore's Army to reply to the summons via the coins.
Neville got in trouble with the Carrows for refusing to practise the Cruciatus Curse on other students as a method of punishment, as well as for standing up against their bigotry and cruelty.
along with Ginny and Luna, restarted Dumbledore's Army.
attempted to steal Godric Gryffindor's Sword from Snape's office
Neville was eventually left alone to lead the rebellion efforts (Luna and Ginny were not in Hogwarts anymore). When avoiding the Death Eaters at one point, Neville stumbled into the Room of Requirement, which he was able to turn into a hiding place for the D.A., and to connect to the Hog's Head in order to get food from Aberforth Dumbledore. By May, most of the D.A. had taken to living there.
During the first round of battle, Neville used various plants to attack Death Eaters, and helped transport the injured and dead when a temporary cease-fire was called.
When the Death Eaters approached with a "dead" Harry, Neville stood up in defiance of Voldemort. He was subsequently forced to wear the Sorting Hat as it burned because he refused to join Voldemort. Fortunately, due to Harry's sacrifice, Neville was able to shrug off the Full Body-Bind Curse.
Because of his tremendous bravery shown on the battlefield, Neville was able to pull Godric Gryffindor's Sword from the burning hat, in the process proving himself a true Gryffindor, something that was doubted constantly throughout due to his apparently weak-willed, shy, and bumbling nature. In a single stroke, he killed Nagini, destroying Voldemort's last remaining Horcrux.
Neville subsequently teamed up with Ron Weasley as the defenders of Hogwarts and Death Eaters were forced into the Great Hall and defeated Fenrir Greyback.
All in all, pretty convincing evidence of someone's bravery
Neville is actually quite brave. He might whine a lot and complain, but in the end when the going gets tough he isn't afraid to deal damage. Off of the top of my head Dumbledore once praised him saying:
"There are all kinds of courage, it takes a great deal of bravery to stand up to our enemies, but just as much to stand up to our friends. I therefore award ten points to Mr. Neville Longbottom."
While the Sorting Hat did consider putting Neville in Hufflepuff, bear in mind that Neville did pull the Sword of Godric Gryffindor out of the hat during the final battle with you know who, so at the very least, Neville was a true Gryffindor.
"Only a true Gryffindor could have pulled that out of the hat, Harry."
I'm currently rereading the series and there are so many (smaller, less-notable) ways that Neville showed bravery even from the beginning. Honestly, if I were Neville i wouldn't have the guts to do half of what he did; for example, when he lost Trevor on the Hogwarts express, I would have looked for him in quiet desperation by myself, not daring to admit to everyone that I had lost my pet. That's not even close to everything though. There was the obvious one where he stood up to Harry, Ron, and Hermione; that took a lot of courage. Then there was that time we all seem to have forgotten when he told Malfoy he was worth ten times more than Malfoy and got into a fist fight with both Crabbe and Golye at the same time. Then there was also the time when he "lost" the list of passwords he wrote to get into the common room, when Mcgonagall asked which idiot did it, Neville admitted his error in front of everyone knowing there would be consequences, he could have lied (I would've). Its actually super obvious in hindsight
Pottermore contains a nice list of Neville's achievements that make him a true Gryffindor. These few are some things DVK's excellent answer left out, that further show his bravery.
Year 1 "Standing up to Harry, Hermione and Ron when they try to sneak out of the Gryffindor common room."
‘You can't go out,' said Neville, 'you'll be caught again. Gryffindor will be in even more trouble.’
‘You don't understand,’ said Harry, ‘this is important.’
But Neville was clearly steeling himself to do something desperate.
‘I won't let you do it,' he said, hurrying to stand in front of the portrait hole. 'I'll – I'll fight you!’
Year 5 "Facing down Bellatrix Lestrange (who tortured his parents to insanity)"
Despite being injured he still fought against Bellatrix(sadly to no avail)
‘Longbottom?’ repeated Bellatrix, and a truly evil smile lit her gaunt face. ‘Why, I have had the pleasure of meeting your parents, boy.’ ‘I DOE YOU HAB!’ roared Neville, and he fought so hard against his captor’s encircling grip that the Death Eater shouted, ‘Someone Stun him!’
You must remember that Neville could have been the Chosen One if Voldemort hadn't gone after Harry. Several times in the books and movies, Neville showed his bravery, however small. For example, in either The Chamber of Secrets when Harry and Hermione were going out of the common room after hours, he tries to stop them, saying things like "I'll fight you." Ultimately that ended up with Hermione jinxing him, but he did stand up to his friends, which takes a huge amount of bravery. Also, in The Deathly Hallows final scenes, Harry couldn't destroy the last Horcrux, Nagini, and therefore couldn't yet destroy Voldemort, but Neville came in with Gryffindor's sword and cut her head off, which took an enormous amount of bravery because obviously Nagini was a giant snake that could have easily killed him.
Neville is probably one of the bravest characters of the entire series. As many have said before, his bravery is shown in small acts: standing up to the trio (Harry, Hermione, and Ron in the first book), asking for help, admitting he was wrong, etc.
But I believe his bravery is best shown in his classes, particularly potions. If one remembers, his boggart is Professor Snape, one of his teachers. He had to go to school and continually see and interact with literally his worst fear. I'm honestly surprised he didn't have total mental breakdowns having to deal with Snape on a daily basis. I know that I wouldn't have the strength mentally to deal with something like that.
What I gathered from the books primarily is that the sorting hat can see what your natural traits are, but it can also tell where your heart wants you to go, despite yourself. Most of us envy traits we don't have and would like to improve what we are weak at. The same is true of Wizards. Harry should have been a Slytheryn, but he wanted to focus on his brave and bold nature. Harry deeply wanted to reject everything about himself that was Slytheryn. Ron should have been Hufflepuff, but his entire family had all been Gryffindors and he wanted to live up to his family's heritage so to speak. That was deeply important to Ron. Hermione is clearly Ravenclaw, but she wanted to be more than just a brain, she craved using her smarts for action, not just academia. Likewise, Neville may have been best as a Hufflepuff, and asked to be there, but deep in his heart he wanted to learn to be brave, even if the idea terrified him. The hat knew Neville had the potential to be far more bold than his grandmother ever gave him credit for. If he was allowed to be in Hufflepuff he may never have shaken off all the self-doubt she poisoned him with. Over the years at Hogwarts he did learn to be bold, brave and be confident in himself. Seems like the had sorted him fine.
A person can also choose his or her House, like how Harry asked to go to Gryffindor instead of Slytherin.
On another note, the sorting hat sees the potential in people. So it might have seen that Neville would be more suited in Gryffindor than in any other House, because of the potential of his bravery.