Personally, I never type "gg" unless the game is only seconds away from ending, or if I'm dead. Sometimes it means I dont quite have enough time to type it. I only type "gg" if I actually think the game was good.
It was originally supposed to tell your opponent or wingman you had a "good" game, as opposed to a bad one. It has become synonomous with saluting a fellow player these days, even when it wasn't a good game. I've heard many people say on TeamSpeak, "I still typed in good game, but that guy is an a**hat".
I think if you're serious about declaring a surrender and want to end the match, typing in "gg" is not the way to do it. You can declare your intent to surrender and leave the map by specifically stating this in chat in game and then backing up your statement by lowering your shields, turning off weapons and heading for the border. An honourable player will not take advantage of this, however, I would wait until your opponent acknowledges your intent before doing so. If your opponent hasn't agreed to your surrender, then there is really nothing to do but die. This is especially the case if your ship is worth VCs in a campaign.