Ramirez, on loan from Southampton and set to become a free agent in the summer, won a penalty in the 32nd minute for Grant Leadbitter to convert and then scored his first goal of the night seconds later.
The Uruguayan, who has hinted he would be interested in staying at the Riverside, followed that up by curling in a brilliant 25-yard free-kick with 13 minutes remaining to complete a 3-0 win.
It lifted Middlesbough to within a point of the leaders and they still have a game in hand. The Teessiders’ next two games against Preston and Reading are also at home.
Karanka said: “Gaston was the player who changed everything.
“For the first 25 minutes we looked as if we were playing for nothing. He was the difference between Huddersfield and us.
“I think it was his best game for us. He scored, he worked and he came up with an assist for the penalty. The things we expected when he came here.
“The main thing is he’s getting better every single day.”
Ramirez took his tally to six goals in 10 starts in a Middlesbrough shirt since moving in January and he could be the difference in the promotion race.
But with Brighton - who won at Birmingham - also just a point behind Boro in third, Karanka is taking nothing for granted.
The Middlesbrough boss said: “If the other teams are losing and we are losing it’s all the same. It depends on us.
“Once again it’s about us and that’s the main thing. We have a game in hand, we need to keep playing as consistently as we are and we are in a really good position. We have to keep going because this league is really tough.”
Huddersfield boss David Wagner was disappointed with the manner of Middlesbrough’s goals, even though his team actually recorded the larger share of possession on the night.
The Terriers remain eight points clear of the bottom three despite the defeat but Wagner is keen to see his side improve.
Wagner said: “The goals we conceded were too easy. Each of them were presents. We lost the ball too easily and were not able to keep it as long as we usually do.
“If you like to get a result against such a good team as Middlesbrough at this stage of the season - when they are very focused - then you have to make nearly everything right.
“Maybe we needed to over-perform. We weren’t able to do this.”
Middlesbrough: Konstantopoulos,Nsue, Kalas, Gibson, Friend, Clayton (Forshaw 74),Leadbitter,Adomah,Ramirez (Stuani 86), Downing,Rhodes (Nugent 79). Unused substitutes: Ayala, De Laet, Mejias, De Sart.
Huddersfield Town: Steer, Smith, Hudson, Lynch, Davidson, Whitehead (Billing 82), Huws, Lolley (Scannell 84), Paterson, Bunn, Wells (van La Parra 71). Unused substitutes: Matmour, Cranie, Allinson, Bojaj.
Referee: Stephen Martin (Staffordshire).