The Gryffindor team, with Ginny Weasley as their Seeker and Ron Weasley in front of the goal hoops, won their final match against Ravenclaw by a margin of at least 300 points (needed in order to be that year’s Quidditch Cup winners). They won the Cup even though Harry Potter was in detention with Severus Snape (HBP24).
There is no mention later of who wins the House Cup, but it probably wouldn't have been Gryffindor. Due to the death of Albus Dumbledore, there were not the usual end of year celebrations to award either Cup (HBP30).
From the Web
Harry Potter Wiki: Quidditch