Requiring 411 for victory from 96 overs, Kent won with two wickets and 14 balls remaining thanks largely to the brilliance of Nash, who had to retire through exhaustion with 21 still needed to win.
The Australia-born former West Indies batsman struck 26 fours and a six in his 230-ball innings and was only eight short of his career best, made for Jamaica against Trinidad & Tobago, when he retired after batting for five hours on the hottest day of the year.
The game was finely balanced for most of the day, but Nash and skipper James Tredwell swung it Kent's way with an eighth-wicket stand of 58.
Teenage paceman Craig Miles was the most successful of Gloucestershire's attack with four for 68, while there were two wickets apiece for Will Gidman and Benny Howell.
Gloucestershire's bid for a third County Championship win of the season got off to a great start when Will Gidman had Sam Northeast caught in the gully by Michael Klinger from the second ball of the day.
But Rob Key took successive boundaries from James Fuller's first over to emphasise that this pitch was still very much a batsman's paradise, on which 1,188 runs had been scored in the first three days for the loss of just 11 wickets.
It became 48 for two when Daniel Bell-Drummond was bowled by Miles, but Nash was quickly into his stride and he took four boundaries from one over from Miles, with two struck through mid-wicket, one driven through extra cover and the other cut to third man.
Play was held up for nearly 10 minutes after the batsmen complained that the sun was glinting off scaffolding above the sightscreen at the Chapel End - a problem that was solved by groundstaff putting a big cover over it.
Kent reached 110 for two at lunch and Nash brought up his 52-ball half-century in the second over after the interval with a cover-driven boundary off Will Gidman.
Key put on 83 for the third wicket with Nash, but he then flicked at a ball from Miles and fell to a tumbling legside catch by wicketkeeper Gareth Roderick for 42.
Nash found another good partner in Ben Harmison, who had contributed 23 to a partnership of 64 when he was caught behind attempting to cut a Howell delivery.
Two overs later, Nash reached his third century of the season with the most fortuitous shot of his innings, a thin inside edge off Fuller that just evaded Roderick behind the stumps and raced to the boundary. His hundred came off 119 balls and included 16 fours and a six, driven over midwicket off Tom Smith's left-arm spin.
Kent took tea on 247 for four, which left them requiring 164 from the final 39 overs, and they stayed firmly in the hunt thanks to a rapid stand of 75 between Nash and Darren Stevens.
Miles returned at the College Lawn End to have Stevens taken at slip by Alex Gidman, but Nash remained largely untroubled on his way to bringing up his 150 from 159 balls.
Geraint Jones added 55 for the sixth wicket with Nash before an attempted cut at Will Gidman only resulted in a third victim of the innings for Roderick. He soon had a fourth as Vernon Philander edged Howell to depart for two and leave Kent on 332 for seven.
Tredwell and Nash saw off the threat of the second new ball and had taken Kent to within sight of the finishing line when Nash went off through exhaustion.
Miles bowled Tredwell with no addition to the total, but Charlie Shreck, with three boundaries, and Calum Haggett completed a dramatic win for the visitors.
- Sports & Recreation
- James Tredwell