Gun time is how long it takes from the starting gun going off to you crossing the finish line.
Chip time is the time between you crossing the start line and you crossing the finish line.
Gun time is the official time. The race organisers are mainly concerned about finishing order, because that's what is used for prizes - who was first man, first woman, first M40, where did the members of a team finish etc. They can stand at the finish line and see all this for themselves, without relying on chips (that might not work). If you start at the back of the race, run faster than all the other runners, but cross the finish line behind the winner - well, that's your own fault. your chip time won't get you a prize.
But for most of us, who aren't going to win the race, and aren't starting at the very front, chip time is more important.