Mayfield, who had a Gordie Howe Hat Trick, was credited with his second goal of the season 4:05 into the game when his centering feed went off Comeau's stick at the edge of the right circle and trickled past Bernier to give the Islanders a 1-0 lead.
Eberle made it 2-0 at 12:58 of the first period when he one-timed Barzal's feed from the slot past Bernier.
Barzal, a center who was the Islanders' first-round pick (No. 16) at the 2015 NHL Draft, extended his point streak to five games.
"He has an uncanny ability to find people while he's shifting his weight and turning away from checks, and instantly he sees the ice," Islanders coach Doug Weight said of Barzal. "You have the hands matching your brain, you can make those plays. Five assists in a game is pretty special."
MacKinnon got the Avalanche within a goal when he scored 40 seconds into the second period. Greiss made a save on Erik Johnson's shot from the left circle, but MacKinnon got the rebound and roofed it to make it 2-1.
New York quickly responded with power-play goals 2:51 apart by Leddy. The defenseman scored 1:33 into the period when his shot from the point found its way through a crowd and past Bernier. He made it 4-1 at 4:24 when his shot ricocheted off the end boards, deflected off Avalanche defenseman Patrik Nemeth and trickled into the net.