The 53-year-old Perry closed with a 7-under 65 for his second victory of the year and seventh overall on the 50-and-over tour. He finished at 23-under 193 at TPC Twin Cities.
''This was a warmup week for me to work on my short game,'' Perry said. ''From 100 yards and in this week I was better than I ever can remember in my career. I was hitting it around the pin and I was converting. I was making putts.''
But, to be successful at Valhalla, Perry knows he'll have to drive it exceptionally well and successfully hit his hybrids.
''It's going to be a great challenge,'' Perry said. ''Hopefully, I can carry some of this momentum over.''
Langer, the Senior British Open winner last week by a tour-record 13 shots, shot 63. He overcame a four-shot deficit on the back nine and was tied with Perry going to the par-5 18th.
In the second-to-last group, Langer's second shot just cleared the water hazard and landed in the tall grass. He chipped on from an awkward stance and two-putted for par.
''My goal today was to shoot 8 under thinking 21 under should have a chance to win. I shot 9 under, outdid myself, and still didn't win,'' he said. ''What Kenny did this week is pretty exceptional.''
One group behind, Perry hit his second shot into the grandstand behind the green. After a drop, he pitched to about 15 feet and made the putt.
''It was an easy putt for me,'' he said. ''I don't always make them, but I feel like I should make them and I knocked it right in the middle.''
It was the eighth straight year the tournament's winning score was at least 15 under, including three totals of better than 20 under. David Frost set the record at 25-under 191 in 2010. The scoring average of 69.609 is the lowest in the tournament's 22-year history.
Perry, who also won the Regions Tradition in May, birdied four of six holes around the turn for a four-shot lead over Langer, Maggert, Dawson and Sauers.
But Langer, who won the event in 2009 and 2012, birdied five of the first six holes on the back nine, including a lengthy putt on No. 14, to get within one.
''I was just trying to make birdies, just trying to go deeper and deeper,'' Langer said. ''I looked at the leaderboard somewhere around the eighth hole and saw that I was four behind or whatever and I figured I got to go really low here if I want to have any hope.''
A birdie putt at 17 moved Langer into a tie less than a minute before Perry, who hadn't been scoreboard watching on the back nine, made a par putt on No. 16.
''I was just cruising, thinking pars were good. I'm thinking if I par in it's over, and then I look up on 17 and we're tied,'' said Perry, who finished second, third and seventh in the event the past three years.
He began the day with a one-stroke lead over Dawson. While Perry birdied Nos. 7 and 8 and made par on the par-4 ninth, Dawson went par-par-bogey to give Perry a three-shot cushion. Dawson's tee shot on No. 9 found the weeds, forcing him to hit back into the fairway on his second shot.
Sixty-nine-year-old Hale Irwin bettered his age for the third straight day with a 68 to tie for ninth at 14 under. The last player to better his age three times in an event was Gary Player at the 2009 Mitsubishi Electric Championship.
Wes Short Jr., who shot a 62 to miss the course record by a stroke, matched Irwin at 14 under.