Grier scored in the final minute of the first period and then added a goal midway through the third that made it 4-1 for his first multigoal game since Jan. 4, 2007, against Detroit.
But the Sharks allowed two goals in the final 3:10 to make things interesting before an empty-net goal in the closing seconds iced it.
"Our focus will be the lapses that got them back in the game," McLellan said. "It's unacceptable that we were up 4-1 with about 3 minutes left in the game and on the power play and we give them a short-handed goal. We have a lot of learning to do as a hockey club, learning how to win. ... It's been creeping into our game a little bit. It's something we have to work on."
Ryan Clowe opened the scoring with his 16th goal that helped San Jose go on to another victory at the Shark Tank. The Sharks have not lost in regulation in 30 regular-season games here, including all 21 this season.
The Islanders, meanwhile, lost their 12th straight on the road in a game that looked to be as big a mismatch on the ice as it was in the standings for most of the first two periods.
"We wanted to make sure we came out and played our game," Grier said. "We didn't want to let any more games slip or points slip from teams that are underneath us in the standings. It would have been easy to overlook these guys but I think we came out and had a pretty strong first period."
The Sharks moved one point ahead of Boston for the top spot in the NHL with 63 points in 38 games. But despite the early season success, San Jose had no players voted to the Western Conference All-Star starting lineup announced Saturday.
The Islanders remain the league's worst team with just 28 points in 40 games.
For most of the first two periods, the Islanders couldn't keep up with the speedier Sharks as the game was played mostly in New York's end. San Jose broke out to a 3-0 lead with goals by Clowe, Grier and Dan Boyle, while outshooting the Islanders 28-6.
A goal by Richard Park late in the second period helped New York avoid the shutout, and the Islanders nearly got back into the game except for a sprawling, stick save by Evgeni Nabokov that robbed Doug Weight later in the period.
That was one of the few times Nabokov was tested, as he made 21 saves in the game. That one highlight generated plenty of cheers and a chant of "Nab-by! Nab-by!" from the appreciative sellout crowd.
Tim Jackman added a short-handed goal in the third period and Thomas Pock scored with 1:03 remaining to cut San Jose's lead to 4-3. But Patrick Marleau iced it with an empty-net goal in the closing seconds, matching his goal total from last season with 19.
"They're a good team," Islanders coach Scott Gordon said.
"There's no shame losing to that team. They controlled the puck and it's hard to get the puck from them. On the plus side we were able to get more pucks to the net after the first period. The third period we played a lot better as compared to the first two, but again we came up short."
The Islanders generated no scoring chances early and had more fights than shots until late in the first period. Early in the period, Tim Jackson got into a scuffle with San Jose's Alexei Semenov, with the two wrestling each other to the ice. Later, New York's Weight got into a more heated fight with Christian Erhoff after the Sharks defender punched Mark Streit.
San Jose managed to find time to score as well as fight, striking first when Clowe knocked home a blind, backhand centering pass from Milan Michalek. Then in the final minute of the period, Grier tucked a wraparound by Joey MacDonald to make it 2-0.
Boyle's wrist shot through a screen by Joe Thornton made it 3-0 midway through the second period.
"They do a good job at getting the puck to the net," said MacDonald, who made 42 saves. "They have some big bodies they can throw in front. It's hard for any goaltender to fight through traffic. A lot of problems were caused by the third guy coming in late. That killed us. The third guy came in late and no one picked him up. We need to address that and move on."