Gaustad had two goals and an assist, McCormick had a goal and two assists, Thomas Vanek scored twice, and Ryan Miller made 26 saves to help lead the Buffalo Sabres to a 6-3 win over the Sharks on Thursday night.
San Jose had a letdown one night after a shootout win over Philadelphia in which the Sharks overcame a three-goal, third-period deficit for the first time in franchise history.
McCormick's goal early in the third period -- set up by Gaustad -- steadied the Sabres, who were on the verge of blowing a three-goal lead built over the game's first 35 minutes.
Buffalo went ahead 4-2 on McCormick's fourth of the season just 31 seconds into the third when he chipped in Gaustad's feed from the right corner.
"Between periods we were talking about staying with our game and not panicking," McCormick said. "There wasn't any doubt that we could keep that lead, and we just brought that attitude into the third."
Gaustad didn't know the Sharks had staged a similar comeback on Wednesday against the Flyers, and he wasn't worried about any repeat performance.
"I wasn't paying attention to it," he said. "They have a lot of scoring power, but I think it was just us playing our game. That was the thing. Just staying confident and not worrying about what they're going to do, but focusing on our game."
Jason Pominville also scored for Buffalo, which has won four of six. The Sabres are 14-1 at home against the Sharks.
"Is there a reason why every time they play here we do well? I don't know," Pominville said. "I just think we were prepared and focused and ready to do what we had to do to win the game."
The Sabres weren't safe even after McCormick's goal. Douglas Murray cut the Sharks' deficit to 4-3 with 10:34 left by firing in a slap shot from the top of the left circle.
But Gaustad iced it with an empty-net goal with 27 seconds to go. Vanek made it 6-3 with his second of the game, scored with 8.7 seconds remaining.
"We got six and we could have had more," Buffalo coach Lindy Ruff said.
Antti Niemi made 31 saves for the Sharks, who went 3-2 on a five-game road trip.
"It was too much for us to overcome," San Jose coach Todd McLellan said. "You can see signs of character and determination, but on the other hand there are those moments where we aren't there yet."
Gaustad gave the Sabres a 1-0 lead with his second of the season with 7:42 remaining in the first period. Off the faceoff in the left circle, McCormick's shot went in off Gaustad's stick.
Vanek pushed Buffalo's lead to 2-0 with his team-leading 12th goal at 6:48 of the second. After Derek Roy sent a slick behind-the-back pass from below the goal line into the slot, Vanek teed off with a one-timer that went between Niemi's legs.
Pominville made it 3-0 with a short-handed goal with 6:34 remaining in the second. San Jose defenseman Jason Demers whiffed on a pass at the Buffalo blue line before Pominville picked up the loose puck and went on a breakaway.
The Sharks cut the deficit to 3-2 after two periods with a pair of goals 3:25 apart. Couture started the surge with his team-leading 14th of the season on the power play. Vlasic's wrist shot from the slot made it a one-goal game with 45 seconds remaining in the second.
"We didn't play well again, simple as that," Couture said. "We made too many mistakes in our own end and didn't generate enough offense."
Buffalo D Shaone Morrisonn missed his second straight game because of lingering effects from an elbow to the head from Columbus defenseman Jared Boll. ... Couture scored six times during San Jose's five-game road trip. ... Niemi faced the Sabres for the first time. ... Miller has started six straight games after missing two because of groin soreness. He is 4-1-1 during the stretch. ... Pominville has scored at least one short-handed goal in five of his six full NHL seasons. He has seven career short-handed goals.