Georginio Wijnaldum had a shot deflected in off Martin Skrtel in the 69th minute before adding a second in stoppage time to earn the Magpies only their third league win of the season.
McClaren was delighted with the three points and felt they were well deserved following a tough period.
He told Sky Sports 1: “That’s what you have to do to win a game in the Premier League. You’ve got to work really hard and crawl back into the dressing room and that’s what they’ve done, every time we’ve won and got a result – that’s what they’ve done.
“Now we need to maintain that and they’ve just proved the harder you work, the luckier you get.
“We stayed in the game. At the start you could see a lack of confidence but we grew into the game and I thought we deserved to win.
“What we’ve been through in the last few weeks – they (the players) have to learn from that – to take the knocks and the hits and come back with performances like that.
“Even the supporters were growing into the game and we were gradually turning them around. Normally we don’t start second halves very well, but we started the second half really well and we were a big threat.”
Man-of-the-match Wijnaldum was pleased to follow up last weekend’s 5-1 thrashing at Crystal Palace with three points here.
He said: “We have had a few difficult weeks and we had to recover after last week because the performance was not so good. We trained hard together and tried to keep the confidence and it worked.
“It’s difficult to win games….but we gave everything in the end and then you can be proud because there’s no regrets – and that’s what we did here.
“We fought to win the game and we were lucky that we won. We worked hard, especially in the first half, we worked hard together .”