"It didn't look good," Lundqvist said of his team's power play that somehow clicked twice. "We really struggled on the power play, but two goals went in. It felt like they were not really sharp, but that's what happens sometimes."
Nikolai Zherdev passed the puck onto Markus Naslund's stick in the crease and he deftly slid it to Gomez at the right post for a jam shot that got past Hiller for the winner with 7:21 remaining, "They made a play in the crease area and Naslund backed into our goalie and moved the puck over to the other side with both feet in the crease," Ducks coach Randy Carlyle said. "Gomez was almost behind the net when he tapped it in."
Naslund, who scored a power-play goal in the first period, had his back to Hiller, but the goalie put more blame on himself for letting Gomez's shot sneak through.
"He was outside the crease, I think," Hiller said. "I should still be able to stop it."
The Rangers, playing their first home game following a 3-1-1 trip, hopped back over the New Jersey Devils into first place in the Atlantic Division. New York is now off for a week for the NHL All-Star break.
"It's a good little run of points here. It's such a tight division, it's such a tight race. Every night is a big game," Rangers captain Chris Drury said. "It's going to be a big test for us when we get back."
Gomez also had an assist, Fredrik Sjostrom added a short-handed goal in the second period, and Lundqvist made 32 saves for his 24th win. The Rangers bounced back from a lackluster 3-0 loss at Pittsburgh on Sunday that wrapped up the trip.
New York (28-16-4) scored 12 goals in its final six games before the break, but earned nine points in that stretch.
"We're just kind of playing to our strengths," Drury said.
"We know we're not a high-scoring team, but that's OK. We'll win games with defense and goaltending. We'll win 2-1 or 3-2 with an empty net. A win is a win."
Anaheim, 1-2 on a five-game trip that continues Wednesday on Long Island and concludes after the break, got goals from Corey Perry and rookie Bobby Ryan. Jonas Hiller stopped 26 shots, giving a break to Western Conference All-Star starter Jean-Sebastien Giguere.
Hiller was pulled for an extra skater with 1:25 left, while Anaheim was on a power play, but Blair Betts sealed the win with a short-handed, empty-net goal with 33.9 seconds to go.
"Right now, we're just shooting ourselves in the foot," Ducks defenseman Chris Pronger said. "It's not fun."
Anaheim answered with a late goal in each of the first two periods to forge ties. Soon after the Rangers failed on a power play, in which they were whistled for icing twice, Perry got the Ducks even at 2 with his 14th goal.
Lundqvist had made a quick left pad stop against George Parros on a redirect in tight, but that only briefly protected New York's lead. Perry took a pass from Andrew Ebbett in the slot and blew past defenseman Dmitri Kalinin before beating Lundqvist.
New York had gone ahead 2-1 at 3:22 of the second when Sjostrom chased down teammate Michal Rozsival's long clearing attempt during an Anaheim power play and scored from the left circle. It was Sjostrom's third goal and snapped his 26-game scoring drought.
Naslund staked the Rangers to their first lead when he ripped in a drive from the slot with 7:13 remaining in the opening period. Naslund was set up perfectly after brothers Scott and Rob Niedermayer knocked the puck right to him while trying to clear the Anaheim zone, and scored his 15th goal to move into a tie with Drury for the team lead.
Ryan made it 1-1 with his 14th goal, which got him into a tie among NHL rookies at 13:45 of the first. Ryan, chosen No. 2 in the 2005 draft after Sidney Crosby went first to Pittsburgh, has played in only 30 games this season with the Ducks. He spent the first 18 games in the minors, but has come on recently with six goals in seven games - including a hat trick.
Notes: Sjostrom's previous goal was Nov. 17 against Ottawa. ... Rangers LW Aaron Voros, a healthy scratch for five straight games and seven of nine, rejoined the lineup along with LW Dan Fritsche, who was benched the previous 20. They replaced forwards Petr Prucha and Lauri Korpikoski. Voros was called for three penalties, two in the third period. ... Perry has recorded a point in five of six games, including five goals.