Semyon Varlamov made 20 saves for the Islanders (23-19-4), who have lost two in a row and four of five.
"It's something where we've got to find our way through it," New York coach Lane Lambert said. "Again, we need to collect some wins here. It's a tough league. Unforgiving league. Nobody's feeling sorry for us."
The Islanders completed their season-long five-game homestand at 1-2-2.
"I feel like we played better than what the results are," Lambert said. "Results are results, and [we're in] a results-based business."
Zach Parise gave the Islanders a 1-0 lead at 15:41 of the first period. The forward one-timed a pass from Sebastian Aho from the top of the left circle that beat Ullmark to the far side.
McAvoy, who grew up 15 minutes away in Long Beach, New York, tied the game 1-1 7:48 into the second period. He scored his third goal of the season when he one-timed Matt Grzelcyk's feed between Varlamov's right pad and his blocker.
"It was very nice to score in front of my family," McAvoy said. "It was an important goal that got us back into it. We were able to take over from there."