The 20-year-old Kim is the second-youngest winner in Web.com Tour history. Jason Day was 19 when he won the 2007 Legend Financial Group Classic in Ohio.
Kim won with a 3-foot putt on the par-5 18th after pitching from 50 yards.
"Walking up to the green, I felt good," Kim said through a translator. "I knew that line."
Kim closed with a 2-under 68 to match Lovemark and Roach at 12-under 268 at TPC Stonebrae. The three players began the round tied for the lead.
Lovemark, playing a group ahead of Kim and Roach, bogeyed the par-5 18th in regulation to fall into a tie. Kim and Roach followed with pars, with Kim missing a 3-footer for birdie.
"I was happy to have another try," Kim said. "I was very fortunate. This is very big for me."
Kim earned $108,000 to jump from 67th to 16th on the money list with $162,350. The top 25 after the final five events in the regular season will earn PGA Tour cards.
Roach and Lovemark each made $52,800. Roach went from seventh to third with $236,516, more than enough for a PGA Tour card. He won the El Bosque Mexico Championship in April.
Lovemark jumped from 26th to 11th at $164,921.