Taranaki claimed the Ranfurly Shield in thrilling style as a late Jordie Barrett penalty earned a one-point victory.