Dallas has won five straight and eight of 10. The Stars also have won five straight on the road.
"Anytime you can get two points it doesn't matter where you get them," Hagman said.
Minnesota lost its second straight and is 1-2-2 in its last five home games.
Hagman scored his second goal in three games when he took a pass in the left circle from Loui Eriksson, fought off a check from Martin Skoula, cut across the crease and put a backhand past Niklas Backstrom at 3:11 of the final period. It was his seventh game-winning goal, one off Alexander Ovechkin's league-leading eight.
"It seemed like a game where one goal was going to decide it," Dallas coach Dave Tippett said. "Both teams were playing hard and we were fortunate to get it."
Hagman's previous career best was 17 goals last season with the Stars.
"I've been able to play a little bit more offensively, and get the chance to play on the power play," Hagman said. "Of course, scoring 20 is nice, but the whole year overall I've been pretty happy with the way that things have gone, and the way the team is playing right now has helped a lot."
The goal came moments after Smith stretched to make a right pad save on Marian Gaborik, who tried to tip a feed from Pavol Demitra into the Dallas net on the Wild's best scoring opportunity.
"I don't do the splits too often, but it was a moment that called for it," Smith said.
It was the second shutout of the year for Smith, who started for the first time in six games. Marty Turco, who has started 41 games, did not accompany the team on the trip after injuring his neck when he collided with teammate Jeff Halpern in Tuesday's win over Vancouver.
"Marty's probably stole four wins for the team, and that's what we've got to do right now," Smith said. "The difference between wins and losses is a timely save here or there and then a big goal. It was a huge win."
Minnesota has scored two goals in losses to the league's top two teams in points over a three-day span. The Wild were beaten 3-2 in overtime by Detroit on Tuesday, after giving up the tying goal with 80 seconds to play in regulation.
"It was a tough loss, for sure, and maybe it carried over," said Brian Rolston, whose six-game goal-scoring streak ended.
Dallas, 9-2-1 in its past 12 against the Wild, was 0-for-6 on the power play.
Minnesota has killed off 26 straight penalties, including a 66-second two-man disadvantage in the first period. Backstrom stopped a tip by Brenden Morrow to thwart the best Dallas chance.
Dallas had a 4-minute advantage late in the second period, but was again held without a goal. The closest the Stars came to scoring was Mike Modano missing on a tip after a cross-crease pass from Jussi Jokinen.
Gaborik almost gave the Wild the lead moments after the power play expired, but Smith poke-checked the puck off the speedster's stick.
"The first two periods I don't think we worked hard," Minnesota coach Jacques Lemaire said. "The third period we worked harder, but they elevated their game too, as soon as we started to play harder. That's what usually happens."
The last time the Stars won five straight away from Texas was Nov. 12-Dec. 10, 2005. The franchise record is seven straight road wins. ... Modano, who began his career with the Minnesota North Stars, was honored by the Wild before the game for becoming the career American-born scoring leader. ... The Stars recalled Tobias Stephen from AHL Iowa under emergency conditions to be Smith's backup. ... Dallas D Sergei Zubov was placed on injured reserve, retroactive to Jan. 17, with a groin injury. ... Minnesota RW Mark Parrish missed his second straight game after sustaining a concussion last Saturday.