Chris Gayle scored a match-winning half-century as West Indies thrashed Pakistan by seven wickets at Trent Bridge, Nottingham, on Friday.