Gayle, 101 off 128 deliveries and Bravo, 112 not-out off 124, gave the West Indies a great platform for a huge score, but they only managed 272 for the loss of four wickets after Brian Lara had won the toss and elected to bat.
The Windies' failure to capitalise on the twin hundreds was exploited by England as they raced to 82 off their first 11 overs before they lost their first wicket, with Andrew Strauss being the early destroyer.
Strauss, opening the batting with Ian Bell, scored 50 off 47 deliveries before he was bowled by Gayle, while Bell was also eventually dismissed for 50 when he was run out.
England captain Andrew Flintoff chipped in with 25 from 27 batting at number three, before Paul Collingwood was dismissed for a golden duck, caught Bravo bowled Gayle, to set up a thrilling run chase.
But it was Pietersen who would steal the show after Bravo and Gayle had starred earlier, with the England middle order batsman belting a superb 90 not-out off 86 balls, including nine fours and a six to win the match for his side.
With wickets falling around him, the 26-year-old held things together with good support from fast bowler Sajid Mahmood (14 off 12) in the dying stages.
Earlier, Gayle scored his 14th one-day international hundred while Bravo notched up his first as the pair put on 174 for the second wicket in an impressive batting display by the West Indies.
23-year-old Bravo came in with the score at 35 for 1 after opener Shivnarine Chanderpaul was dismissed LBW by Jon Lewis for 13, racing to 50 off 60 deliveries including 10 fours.
Bravo!: Dwayne scores his first
one-day international century
Gayle was slightly slower in the early stages, reaching his half century off 80 deliveries, after which he cut loose to be finally run out for 101 off 128 balls, including ten fours and a six.
Bravo was given a life on 79 when England keeper Chris Read missed a stumping chance off the bowling of spinner Jamie Dalrymple when he failed to gather the ball with Bravo well out of his ground.
Ramnaresh Sarwan joined Bravo after Gayle's dismissal and put on a quick-fire 29 off 19 balls with three fours and a six, while the only lowlight of the West Indies innings was Lara's continued poor form, getting bowled by Mahmood for three.
Flintoff made his return with the ball after six months off through injury, bowling five overs for the figures of 0-27.
The West Indies must now wait for the outcome of the final match of the round-robin series between India and Australia on Sunday to see who tops Group A.
The Windies will definitely qualify for the semi-finals, however the winner of the India-Australia match is likely to surpass them at the top of the table on net run-rate.
The winner of Group A will play New Zealand in one semi-final on November 1 while the runner-up will play South Africa in the other semi on November 2.