The paceman bowled Ian Bradshaw and Daren Powell [ Images ] in the 50th and final over before trapping Corey Collymore lbw as West Indies were all out for 283 in reply to South Africa's 284 for six.
Langeveldt picked up a career-best five for 62 to help the tourists take an unbeatable 3-0 lead in the five-match series.
His performance stole the thunder from South Africa's opening batsman Boeta Dippenaar (123) and his rival opener Chris Gayle [ Images ] (132).
"This is my first hat-trick at this level but I've had about six in the leagues in England [ Images ]," Langeveldt told reporters.
"I'm used to bowling in the last over, I told the guys that the game isn't over until I bowl the last over."
South Africa captain Graeme Smith [ Images ] said he had experienced "my most tense final over ever...I'm struggling to breathe.
"Charl has the skill and the heart and the mind for those situations."
Lara made 32 before he lofted a drive off Langeveldt straight to Andre Nel [ Images ] at deep extra cover.
Shivnarine Chanderpaul [ Images ] then added 94 with Gayle until the West Indian skipper top-edged a ball from Langeveldt to Justin Kemp at short fine leg to fall for 23.
The total was 281 for seven in the 49th over when paceman Makhaya Ntini [ Images ] had Courtney Browne caught by Nel at mid on.
The first two balls of the final over yielded two of the required four runs before Langeveldt recorded his hat-trick.
Earlier, Dippenaar produced a one-day best innings, striking 12 fours in 129 balls after South Africa were put in to bat.
The elegant Dippenaar's previous highest score was 110 not out against Pakistan in Lahore [ Images ] in 2003-04.
West Indies, who dropped three catches, delivered another ragged performance in the field before claiming five late wickets for 39 runs.
Dippenaar and Jacques Kallis [ Images ] had added 99 for the second wicket when Powell put down a sharp return catch offered by Kallis.
Opener Dippenaar also had two escapes in the 41st over delivered by Bradshaw.
He was dropped on 110 by fine leg Collymore and had another life on 112 when mid off Powell made a hash of a skied drive.
Bradshaw's luck turned in his next over when long off Marshall held on to Dippenaar's looping drive with the score on 237. The second-wicket pair had put on 194.
Four overs later Kallis's limp drive to a full toss from fast bowler Collymore was caught by Gayle at extra cover. He made 87.
Captain Chanderpaul said: "We just faltered here and there, and I thought we came back well after the start they got.
"We ran them close but just didn't get there."
The fourth match in the series is in Port of Spain, Trinidad on Saturday.
South Africa 1st innings
G. Smith c Dw. Smith b Bradshaw 28
B. Dippenaar c Marshall b Bradshaw 123
J. Kallis c Gayle b Collymore 87
J. Kemp run out 12
M. Boucher not out 13
S. Pollock b Bravo 0
H. Gibbs c Dw. Smith b Bravo 11
A. Prince not out 1
Extras (lb-3 nb-1 w-5) 9
Total (for 6 wickets, 50 overs) 284
Fall of wickets: 1-43 2-237 3-251 4-258 5-260 6-276
Did not bat: C. Langeveldt, A. Nel, M. Ntini
Powell 10 - 0 - 60 - 0 (w-2)
Bradshaw 10 - 0 - 51 - 2
Collymore 10 - 0 - 50 - 1 (nb-1)
Dw. Smith 9 - 0 - 50 - 0
Gayle 2 - 0 - 19 - 0 (w-1)
Bravo 9 - 0 - 51 - 2 (w-2)
West Indies 1st innings
C. Gayle c Pollock b Nel 132
X. Marshall c Boucher b Ntini 15
R. Sarwan b Nel 0
B. Lara c Nel b Langeveldt 32
S. Chanderpaul c Kemp b Langeveldt 23
D. Smith b Nel 21
D. Bravo not out 21
C. Browne c Nel b Ntini 9
I. Bradshaw b Langeveldt 1
D. Powell b Langeveldt 0
C. Collymore lbw b Langeveldt 0
Extras (b-5 lb-6 nb-12 w-6) 29
Total (all out, 49.5 overs) 283
Fall of wickets: 1-48 2-49 3-119 4-213 5-242 6-258 7-281 8-283 9-283 10-283
Pollock 10 - 0 - 67 - 0 (nb-3 w-1)
Ntini 10 - 0 - 45 - 2 (nb-4)
Nel 10 - 0 - 42 - 3
Langeveldt 9.5 - 0 - 62 - 5 (nb-5)
Kallis 1.1 - 0 - 2 - 0
Kemp 6.5 - 0 - 47 - 0 (w-1)
Smith 2 - 0 - 7 - 0
Result: South Africa won by 1 run