I think it's always good to say, even if you didn't have as much fun. Generally both teams are trying their best to come out on top, even if it's a terrible mismatch. I'll always say gg to players that are trying, but if I end up winning because they have a whole ship leave or some kind of troll on their team, I'll often apologize. If I end up losing, even if it's from trolls or leavers, I'll still commend the enemy for a good game.
I suppose there's a few instances where I wouldn't say gg, this is usually if the opposing team is entirely composed of trolls and/or rude players.
Not saying gg generally comes off as extremely disrespectful (in the cases where you replace it with bg or such. Not saying anything at all isn't that bad). There was a clan I respected for some time until they stopped saying gg and always reverted to just saying 'game' at the end of their matches, and this came off as extremely rude and turned a lot of players against them. They've more or less stopped doing this, but the hard feelings from when they did it are still around.
So in the end it's the usual "if you don't have something nice to say, don't say anything at all." It's nice to say GG after a match, but if it was a terrible match, I wouldn't say anything and let it go rather than saying bg or even going so far as to blame players.