the G5 is compact, meaning it's smaller (and it's a coupe)
The G6 is a midsized car, meaning it's bigger (and usually a 4 door, but also avaliable in a coupe and convertible).
As for which is better, it's all up to personal preference. The G6 is bigger, but it's also more on gas, while the G5 is smaller and better on gas.
As for the drive, both feel the same to me- not the best, but not the worse.
If you're going for a small car, go for the G5. If you're looking for a big car, go for the G6.
I personally prefer the G5- smaller, a bit peppier and the controls are more user friendly. If you were going for a midsized car id go for a Saturn Aura- it's built off the same platform that the G6 is, but it's slightly smoother for some reason, and the interior is a lot nicer/more comfortable.