Glamorgan went down to their second successive three-day defeat, and their seventh championship loss of the season as Gloucestershire completed the double with 10.2 overs of the day remaining.
They were again let down by their batting with their batsmen lacking technique, application and for the fourth successive innings failed to bat for more than 65 overs.
Gloucestershire coach, Richard Dawson, said: "A lot of people contributed to the win, especially David Payne and Hamish Marshall. Payne led the attack in both innings, while his 67 not out enabled us to get 143 run lead on first innings.
"We kept it up for three days and after being 35 for three in the first innings, it was a great effort to score 363. After losing the T20 quarter-final, it was a great confidence booster to come back and play so well in the last two Championship games.”
Gloucestershire added a further 16 runs before they were dismissed for 363 in their first innings, a lead of 143 with David Payne (67no) achieving his career-best score, and Michael Hogan, after taking the last two wickets, returning creditable figures of 25.1-6-36-5.
Only once in the last 12 innings have Glamorgan’s openers shared a 50-run partnership, and they were again in trouble when Owen Morgan was bowled by Josh Shaw in the sixth over. He was followed four balls later, when Nick Selman was caught by wicketkeeper Phil Mustard off Payne.
David Lloyd, who has been short of runs recently, again failed when he wafted at a ball outside the off stump, but Aneurin Donald, after scoring four, had the distinction of becoming the youngest Glamorgan player to score 1000 runs in a season.
Donald and Bragg put on 45 for the fourth wicket, but Donald became Jack Taylor’s first victim when he edged an arm ball to slip, before Kieran Carlson collected a pair when he became Mustard’s third victim behind the stumps.
Graham Wagg soon made his intentions clear by driving Taylor’s off spin for successive sixes, but the bowler got his revenge when he bowled Wagg for a breezy 21. Apart from Bragg, who scored with 52 that included six boundaries, there was little resistance from Glamorgan’s batsmen until Mark Wallace and stand in captain Hogan put on 58 for the final wicket.
Needing to score 90 to win, Chris Dent and Gareth Roderick made a cautious start before Dent drove Wagg, who had reverted to left-arm spin, over long on for six, and Roderick struck Carlson for three overs in his first over. They then hurried along at four runs an over, with Roderick reaching 50 from 56 balls with the captain hitting the winning runs in the twentieth over.
Glamorgan coach Robert Croft said: "We let ourselves down on a flat pitch with some slack cricket shots. We also failed to take chances after they had lost early wickets and if you don’t make the most of your chances then you are going to suffer."