Webb birdied the par-5 17th to match Kim at 12-under par. Both players found the fairway at 18 but Kim's approach fell short of the green while Webb's landed 20 feet right of the flag.
Kim went right at the cup with her chip but ran it some six feet past the hole. Webb didn't put a good stroke on her birdie try, leaving it four feet short of the hole. Webb elected to clean up her par instead of marking, putting all of the pressure on Kim to match Webb with par.
Kim's par putt missed right to give Webb her second win at this event.
'Obviously, I was not really expecting this, but it is great,' said Webb, who also won in Rochester in 1999. 'I've been struggling for most of this year. I have played well early and struggled a little bit when I've needed to play good, but not today. I missed some shots, but all in all, I played well.'
Webb won for the 27th time in her LPGA career and for the 11th time in come-from-behind fashion. The first-place check for $180,000 pushed her over $8 million in career earnings.
The pivotal hole turned out to be the par-4 16th. Kim pushed her tee shot right and had to punch out to the fairway while Webb was in good shape. Kim's approach fell short of the green but she chipped to a foot to set up the kick-in bogey.
Webb landed 12 feet from the hole and calmly sank her birdie try to complete the two-shot swing and get within one of the lead.
At the 17th, both players came up short in their bids to reach the green in two. Webb chipped her third shot to 10 feet while Kim blew her chip 15 feet past the cup. Kim's birdie try needed one more roll to fall but Webb found the bottom of the cup with her putt, tying her for the lead.
Webb prevailed on 18 to sneak out with the win.
'I knew that it was anyone's tournament,' said Webb. 'I thought that I might have had an upper hand with the momentum after my birdie.'
For Kim, it was her second consecutive week as the runner-up. At last week's Evian Masters she finished second to Annika Sorenstam, but there she did not squander a four-shot advantage over the last six holes.
'Before the round, my feeling was bad, uncomfortable,' said Kim, who shot a final-round 74. 'I did not have confidence. I don't know why.'
Se Ri Pak, who won her second LPGA Championship title two weeks ago, closed with a 2-under 70 and took a solo third. She finished at 7-under-par 281.
Kristal Parker-Manzo shot a 69 Sunday and came in fourth at minus-four. Jennifer Rosales, Helen Alfredsson, Beth Daniel and Juli Inkster shared fifth at 3-under par.
Laura Davies, the 2001 champion, struggled badly on Sunday with a 12-over 84. She came into the round in third place but finished tied for 29th.
Full-Field Scores from the Rochester LPGA