The German shot a 1-over 72 on Sunday to finish at 5-under 279 at Carnoustie - one stroke ahead of Pavin, who shot a 1-under 70.
Pavin, the American Ryder Cup captain, trailed by three shots at the start of the fourth round but cut the gap to two when he birdied his second hole of the day.
Langer survived three-putting both the 8th and 9th greens. After making birdie at 15, he parred his way to victory.
Pavin finished second, three strokes ahead of Americans Fred Funk, Jay Don Blake and Russ Cochran and Australian Peter Senior.
Leading Scores:
Bernhard Langer, Germany 67-71-69-72-279
Corey Pavin, United States 69-69-72-70-280
Peter Senior, Australia 71-72-72-68-283
Russ Cochran, United States 70-71-70-72-283
Jay Don Blake, United States 67-74-70-72-283
Fred Funk, United States 75-69-67-72-283
Trevor Dodds, Namibia 74-71-69-70-284
Tommy Armour, United States 76-72-69-70-285
Ian Woosnam, Wales 72-67-72-74-285
Jayn Haas, United States 70-69-72-74-285
Tom Lehman, United States 71-75-73-67-286
John Cook, United States 69-72-72-73-286
Jeff Sluman, United States 69-74-70-73-286
Lauren Robert, United States 71-72-75-69-287
David Frost, South Africa 71-75-71-70-287
Mark Calcavecchia, United States 70-70-75-72-287
Larry Mize, United States 69-70-72-76-287
Eduardo Romero, Argentina 74-73-72-69-288
Dan Forsman, United States 68-71-74-75-288
Brad Vaughan, United States 68-76-74-71-289
Mark James, England 74-72-70-73-289
CS Lu, Taiwan 76-71-69-73-289
Gary Hallberg, United States 70-74-68-77-289
Langer wins Senior Open
Carnoustie - Bernhard Langer has won the Senior British Open after surviving a final round chase by Corey Pavin of the United States.