Stastny scored 8:22 into the first period and ended the game with 1:24 remaining in OT when he beat Stars goaltender Kari Lehtonen.
Colorado has won five in a row and is 11-1-0.
"Right now, we're playing very good. We're playing solid hockey," Avalanche coach Patrick Roy said. "We work hard. The thing that I like is before games we're always really well-prepared and we focus. When we jump on the ice, we have good starts, and that's what we want."
Colorado goaltender Semyon Varlamov made 27 saves in his first start since being arrested on domestic-violence charges Wednesday.
"I think the team played unbelievable today for me," Varlamov said. "We were battling all three periods and we scored in overtime. It was another big win for us and another big win for me."
For Roy, seeing his team pull out an overtime win on the road against what he termed a tough opponent only affirmed something he already knew.
"The guys wanted to do well for [Varlamov]. They wanted to play a strong game in front of him, and I thought that was a great game from our team," Roy said. "We showed that we're a family and we stick together and we work hard together."
Stastny concurred that this was a game in which he and his teammates wanted to perform well for their No. 1 goaltender.
"There's been a lot going on with him, with the team in the last 24-48 hours, and sometimes the best thing is to just get in your comfort zone, and that's being on the ice," Stastny said. "When he's on the ice, when he's in net, he's focused on what he does. He gives us a chance to win every night and he was unbelievable again tonight."
Dallas tied the game when Tyler Seguin, who had a goal and an assist, scored with 3:27 remaining in the third period.
From the opening faceoff, the Avalanche were on the offensive, peppering Lehtonen with a barrage of shots. Colorado went on the power play for the first time at 4:09 when Stephane Robidas was called for slashing. That advantage became a 5-on-3 at 5:10 when Antoine Roussel crosschecked Nathan MacKinnon inside the Stars crease. Dallas killed off both opportunities.
"The first period never should have finished 1-0. We should have been up at least 3-0. Lehtonen was outstanding," Roy said.
The Stars weren't quite so lucky when Stastny flipped in a shot just to the right of the goal to make it 1-0. He initiated the sequence by sending the puck around the back of the net. After Jan Hejda gained possession near the blue line, he passed it to Alex Tanguay, who spotted Stastny.
"You look at the start, we took a penalty and then took another one to give them a 5-on-3," Stars coach Lindy Ruff said. "[Lehtonen] had to make five or six really good saves on the penalty kill. We dug ourselves a hole. We weren't playing the game quick enough, and as soon as we kill [the penalty] off, we turn the puck over and let them go the other way right away. That wasn't smart hockey, that wasn't good hockey."
The Stars controlled possession for much of the second period, but the Avalanche took a 2-0 lead 1:19 before intermission when Gabriel Landeskog beat Lehtonen on his glove side following a nice backhand pass from MacKinnon, a sequence that began when Dallas' Ray Whitney turned over the puck near the Colorado blue line.
Dallas scored 3:57 into the third when Alex Goligoski one-timed a pass from Seguin from the left circle to make it 2-1. Goligoski's blistering shot beat Varlamov top shelf in the center of the net.
Colorado nearly answered 37 seconds later when John Mitchell tried to slip a shot inside the near post and would have scored were it not for a miraculous play by Lehtonen, who first got his glove on the shot then whipped around his left leg to keep the puck from going over the line. The play was reviewed for several minutes before it was ruled no goal.
"I thought it went in," Lehtonen said. "I saw one replay and thought I saw the water bottle moving because I didn't feel it touching me because I was kind of all over the place scrambling. It ended up being a good save at a great time."
Seguin tied it when he got the better of Varlamov to his left with a wrist shot from near the faceoff circle.
"It is a big point," Ruff said. "We can talk about all the negative stuff in the first [period], but you can talk about all the work we put in to get back in the game in the second and the third. If you would have asked me after the second period if you'd be happy with a point, I would say if we could battle back and get a point, it would be a big point for our club. It's a small step in the right direction."
Dallas had a third-period power play after a fight between Landeskog and Alex Chiasson at center ice; the Colorado captain was also assessed a minor for roughing, giving the Stars a man-advantage with 3:27 remaining.
Stars captain Jamie Benn had a great look one minute later but Varlamov dashed over to the far post to deny him with a glove save. Dallas remained on the attack, forcing Varlamov to stop several shots at close range, with attempts from Shawn Horcoff and Roussel among the better chances.
Lehtonen stopped 26 of 29 shots.
"I think the reason why they picked up a point is because of him," Roy said of Lehtonen. "He kept them in the game long enough for them to come back in the third because it could have been a 3-, 4-, 5-0 game at some point."
The Avalanche play the Montreal Canadiens on Saturday at Pepsi Center. The Stars begin a three-game road trip Sunday afternoon at the Ottawa Senators.