Quick recap: The house points are an accumulation of each of the four houses' good behavior, good deeds, and academic accomplishments awarded in point form over the course of a school year.
And at the end of The Sorcerer's Stone, Slytherin House had the most points. They were the best house that year, as shown by the points.
Gryffindor House was more than 100 points behind Slytherin, and in last place. But Dumbledore took it upon himself to play major faves and reward Harry, Ron, Hermione, and Neville extra points, making Gryffindor the winner.
And while it's cool that Hermione, Ron, and Harry saved the day, they didn't deserve to win the House Cup.
Should they have been acknowledged for "defeating" Voldy and keeping the school seemingly safe? Yeah, definitely. But not at the expense of the majority of Slytherin students who did nothing wrong and followed the rules.
So congrats, Gryffindor students: You won the House Cup even when you didn't deserve it.