Serbian Jankovic was serving for the title at 5-4 in the second set but world number three Halep won the next three games and battled back for the biggest title of her career.
“I don’t know how I won today because I didn’t play my best,” Halep said. “I didn’t play good tennis, but I just wanted to fight till the end.
“I just had the confidence that I have my chance here in this tournament, and I just did everything to get it. I got it, and I’m really happy.”
The tense encounter had both players making plenty of mistakes but 23-year-old Halep displayed determination to secure her third title of the year following Shenzhen and Dubai.
The 30-year-old Jankovic, who had a testy exchange with her coach, showed clear signs of nerves when she had the title within her grasp in the second set and tired badly in the third.
Halep had a bye before the final after world number one Serena Williams withdrew from their semi-final with injury but the Romanian initially struggled.
Jankovic, who won at Indian Wells in 2010, dominated the first set, playing with freedom and fire but became tense within reach of victory.
She broke to 3-1 and 5-4 to serve for the match but was broken back on both occasions, the Romanian fighting for every point before finally closing out the 63-minute set.
Both players struggled on serve in the third but Halep catured the decisive break at 5-4 to secure her 11th WTA title.
“I think at the end of the second set I got a little bit nervous,” Jankovic said. “I got a little bit tentative, and that was my big mistake. I let her come back into the match.
“I kind of let those nerves take the best out of me. That shouldn’t happen.”
(Reporting by Simon Evans; Editing by Gene Cherry and Ian Ransom)