"GG" stands for "good game." It is customary to say "gg" when you finish playing to inform the other players that you are quitting and not coming back. Usually people say "gg" when they quit no matter if they are winning or losing. And other players usually reply by saying "gg" also.