Rob Klinkhammer and Mikkel Boedker scored 63 seconds apart in the first period for the Coyotes, who handed the Kings their third straight loss and took over sole possession of eighth place in the Western Conference. Mike Smith made 36 saves.
Marian Gaborik, defenseman Alec Martinez and rookie Tanner Pearson scored for the Kings, who were without captain Dustin Brown for a second straight game because of a lower body injury. Jonathan Quick stopped 23 shots for Los Angeles, which fell to 21-1 when leading after two periods.
Yandle tied it with a slap shot from just inside the blue line after he intercepted defenseman Matt Greene's attempted clearing pass from behind the net.
Greene was a healthy scratch in the previous eight games.
Halpern put Phoenix ahead 4-3 with a shot from the left circle that appeared to carom off Quick's glove and then the post before it bounced to Coyotes captain Shane Doan for another point blank shot that Quick stopped with a sprawling save.
But an overhead replay showed that Halpern's shot crossed the goal line before it hit Quick's stick.
Quick missed a chance to tie Rogie Vachon's franchise record of 171 wins. Darryl Sutter will also have to wait for his 500th regular-season victory as an NHL coach.
Yandle leads Phoenix with 49 points, including an assist on Boedker's goal.
The Kings outshot Phoenix 15-2 in the second period, turning a 2-1 deficit into a 3-2 lead.
Gaborik got the puck in the low slot from Anze Kopitar and took a shot that glanced off defenseman Derek Morris' stick and over Smith's glove. It was his eighth goal this season and second in six games since he was acquired from Columbus on Feb. 5.
Smith, who leads in games played, starts, saves and shots faced, withstood an early barrage from the Kings before the Coyotes took a 2-0 lead.
Klinkhammer scored his 11th goal on a rebound at 6:33, and Boedker added his 17th during a power play.
The Kings got within 2-1 when Pearson, in his third stint with the club this season, scored his second goal in 14 NHL games at 17:02 of the first. Los Angeles tied it at 6:50 of the second with Martinez's eighth goal.
Phoenix's Martin Hanzal, who returned after missing seven games with a lower-body injury, assisted on Klinkhammer's goal.
NOTES: The Kings are 126-2-11 in their last 139 regular-season games when leading after two periods. The only other regulation loss was on Jan. 22, 2013 at Colorado. ... Kings F Justin Williams is expected to play in his 200th consecutive game on Thursday. ... Gaborik has 21 goals in 30 career games against Phoenix. ... Pearson's first goal came in his regular-season debut on Nov. 14 against the New York Islanders.