Danilo's deflected drive gave City an 18th-minute lead at the John Smith's Stadium but the reigning champions were far from their fluent best as they sought to rein in Liverpool's seven-point advantage at the summit.
Sane was key to their improvement during the early stages of the second period – crossing for Raheem Sterling to head home before completing the scoring on the end on Sergio Aguero's knockdown.
Asked what Guardiola told his players at the interval, Sane replied: "That we can't play the way we played in the first half, that we have to do more.
"They [Huddersfield] made a lot of pressure too and we know in the Premier League that if they score for 1-1 it will be difficult to win the game.
"He woke us up again a little bit to play our game quicker, better.
"He's always kind of relaxed but tells us we can do better. He did it again."
Danilo's goal was City's 100th in all competitions this season and the Brazil full-back concurred with Guardiola's assessment.
"Sometimes we tried things and they didn't happen," he told Sky Sports.
"In the second half we put in more intensity and that was important."
The win means City have cut the gap to leaders Liverpool to just four points. The Reds' dramatic 4-3 win on Saturday had opened up a seven-point gap over theier north-west neighbours, but City reduced that just under 24 hours later.
Before Guradiola's men can again attempt to draw closer to Liverpool, they face two cup games. First City have the formality of their Carabao Cup semi-final second leg against Burton Albion, before they host Burnley on the FA Cup on Saturday.