Dmitry Kulikov had a goal and an assist, and Mason McTavish and Troy Terry scored for the Ducks (6-13-1), who had lost three straight.
"We just wanted to win a hockey game, and I've got to steal some games every now and then," Gibson said. "Finally, we said enough is enough and were able to get the win tonight."
Barclay Goodrow and Braden Schneider scored for the Rangers (10-7-4), who finished their West Coast road trip 2-1-1.
"We played really well. We hit [two] goal posts," New York coach Gerard Gallant said. "We had lots of opportunities, and Gibson obviously stood on his head, so I can't fault the performance. Just disappointing we didn't get any points out of it, but we played hard, we played well, [and] if you play like that, you're going to win a lot of those games."
Jaroslav Halak made 19 saves in his first start since Nov. 12. He is 0-5-1 in six starts this season.
"I'm sure that second goal he's not happy about," Gallant said of Halak. "He's a veteran guy, he's won a lot of hockey games in his career. We'll get some wins for him."
Artemi Panarin hit the post on a power play at 6:52 of the first period, and Gibson laid his stick flat to stop Mika Zibanejad's shot from crossing the goal line 19 seconds later.