The 20-year-old Kim, the 2005 U.S. Girls' Junior winner in her second season on the tour, birdied the final two holes for a 10-under 278 total on the Blackhawk Country Club course. She earned $180,000.
Stanford, the Bell Micro LPGA Classic champion last month in Alabama, finished with a 75. LPGA Championship winner Yani Tseng (72) was third at 6 under, and top-ranked Lorena Ochoa (72) finished fourth at 4 under.
Kim struggled down the stretch, missing a short birdie putt on No. 13 and bogeying the 14th and 16th holes. She nearly drove into a creek on the par-4 17th, but caught a fairway bunker, hit her approach to 8 feet and made her birdie putt.
Stanford struggled late in the round, too, and no one else, including Ochoa, made a move to put pressure on Kim. Stanford bogeyed the 14th and 16th holes before making a 15-foot birdie putt on No. 17.
Last season as a rookie, Kim nearly broke through for her first win, but lost to Ochoa in a playoff in the Wegmans LPGA.
Kim has six top-10 finishes this year. She tied for third at the U.S. Women's Open and tied for ninth in the Women's British Open, her past two majors.
Longs Drugs Stores, meanwhile, has reached a tentative agreement to sponsor the tournament at Blackhawk through 2010, tournament director Brian Flajole said.