The Sharks ended a three-game losing streak against the Stars, including two road losses this season (3-2 on Dec. 7, 4-3 on Nov. 8).
"We needed a win," San Jose coach Peter DeBoer said. "Everyone looks at the standings, you see where they are, they got four points off us so far this year, so we didn't want them to sweep us. That's a team that's going to be hanging around in the mix in the Western Conference right until the end."
Meier scored his second of the night on a 3-on-1 rush to give the Sharks a 2-1 lead at 2:50 of the third period. He passed the puck to Logan Couture in the middle, got it back in the right face-off circle, and scored to the short side.
"I was kind of getting ready for him to pass it back," Meier said. "He's a great shooter too. He can put those in the back of the net too. It was kind of a wobbly puck there. He gave it back to me nicely, and I found a way to put it behind the goalie."
Thornton increased San Jose's lead to 3-1 at 7:56 when he scored after a loose puck came to him in the right circle.
Heiskanen cut the Sharks lead to 3-2 at 12:24 when he scored from the high slot.
Faksa gave the Stars a 1-0 lead at 3:35 of the second period. Defenseman Julius Honka's shot hit the right post, and the puck went to Faksa, who scored into a wide-open net.
"I thought our effort was pretty good tonight," Dallas coach Jim Montgomery said. "I thought that everybody that played gave an honest effort. The chances were almost even, the shots were almost even.
"They get that shot off a shin pad that goes to Thornton on a backdoor. We didn't get that bounce."
Meier, who scored twice in a 5-2 win against the New Jersey Devils on Monday, tied it 1-1 at 16:20 on a snap shot through traffic from the high slot.
"I think today we had a little bit of a slow start," Meier said. "We weren't ready to play, but then we showed respond. We mixed up the lines a little bit too, which gave us some energy. I think good job by the guys to step it up and find a way to win this game."
The Sharks were not called for a penalty and went 0-for-1 on the power play.