In Philosopher's Stone, when Harry, Hermione and Neville all lose 50 points each for Gryffindor, Harry mentions that it wiped out all the points they had earned beating Slytherin in the Quidditch game earlier. My question is, how do the House Cup and the Quidditch Cup relate to each other at Hogwarts? I was under the impression that they were seperate competitions.
Not quite. TL;DR: We don't know from canon.
The exact quote is:
As for you, Mr Potter, I thought Gryffindor meant more to you than this. All three of you will receive detentions – yes, you too, Mr Longbottom, nothing gives you the right to walk around school at night, especially these days, it's very dangerous – and fifty points will be taken from Gryffindor.'
'Fifty?' Harry gasped – they would lose the lead, the lead he'd won in the last Quidditch match.
'Fifty points each,' said Professor McGonagall, breathing heavily through her long pointed nose.
As you can see, by the time Harry thinks of losing the points he won, he's only aware of being docked 50 points for himself.
However, the last match was against Hufflepuff (NOT Slytheryn which was game #1), and Harry won by catching the Snitch within 5 minutes, meaning that Gryffindor most likely earned more than 50 points (150+ absolute value, and very unlikely that they earned only 50 difference - which would have meant that Hufflepuff managed to score 10 times in 5 minutes).
Therefore, it's basically unknown how much Quidditch games contribute to House Cup but more likely than not, they do NOT attribute the exact amount of points from the game.
It's plausible that they attribute 50 points based on the quote above, but even that is not definite - the quote says "they would lose the lead", but it could very well have been the lead of 49 points, BUT that Harry's Quidditch win gained a lot more than 49 points.
Based on that same line I always assumed that you gained points towards the house cup equal to the number of points earned in the Quidditch Match. You are correct in assuming that the House and Quidditch cups are two separate items, as told found at the end of the Philospher's stone. The Quidditch cup is awarded to the team with the best Quidditch record of the course of the year, where as the House cup is awarded to the House that earned and lost the least amount points from all activities.
"they would lose the lead, the lead he'd won in the last Quidditch match."
It says they would lose the lead not that they would lose all the points they won by winning the match. Those two numbers are not equal since they weren't leading before the match (if their lead would be equal to the amount of points they won, that would mean they were sharing the first place before the match, which we know they weren't).
We know that they're leading in the house cup by 50 points or less (since if McGonagall took 50 points away they would lose the lead). That doesn't mean they earned exactly 50 points by winning the match.
They weren't leading before the qudditch match. We don't know how many house cup points behind the leading house they were. The amount of points they gained by winning the qudditch match is equal to the amount of points needed to catch up to the leading house plus 50 points (or less) of lead.
I'm not sure if my explanation makes sense.
(example: before the match: Gryffondor: 150 house cup points the leading house: 200 points
after the match: Gryffondor: 250 points the leading house: 200 points
Gryffondor gained 100 points, they're now leading the house cup by 50 points (50 points to catch up + 50 points of lead).
My points is: the reason they were only leading the house cup by 50 points is probably because they needed a lot of points to catch up to the house that was previously leading the house cup, so it's still posible that they attribute the exact amount of points from the game (either absolute value or difference).