The Austria international had drawn a blank in Stuttgart's first five games of the campaign and his place in the attack was under threat before last night's game, but he proved the critics wrong with two goals.
However, his first strike was not exactly intentional, saying an injury had led to him being in the right place for his first goal.
"My goal was a bit lucky," he said. "I had just picked up an injury so I was not in the penalty area where I would normally be for a header from the corner.
"It was pure coincidence that I was stood where the ball fell."
Nevertheless, the goals will have done both Harnik and Stuttgart good as the club moved temporarily into third place.
"I am delighted for Martin that he has scored," said Stuttgart coach Bruno Labbadia on his club's website.
"He runs a great deal and is always a threat in front of goal and that is why I chose to keep him in the side.
"I knew that the bubble would burst eventually.
"He has a lot of potential and still some room for improvement."
After following their 7-0 defeat to Bayern Munich with a 2-1 loss at home to Stuttgart, there is more than enough room for improvement for Freiburg, although their coach Marcus Sorg felt they were unlucky last night.
"We are very disappointed," he said.
"The team put a lot into this game and showed a good reaction to the 7-0 defeat to Bayern, but we were unfortunately not rewarded.
"With a bit of luck, we would have got the equaliser, but we just did not have this luck tonight (Friday)."