The Sonnar stops down to f:22, the Gauss to f:32. There were several versions of each, but the minimum F stop is the one sure way to distinguish between them.
Originally Posted by MikeTime
As for image quality, the one sure way to know is to get one of each and try them, they're not expensive and you can sell on the one you don't keep for what you payed or a bit more. I've had mine, a '60s Sonnar, for about 14 years and I'm still just tickled pink every time I look at the results. The Gauss version is reputed to be a bit sharper (!!) at close range.
The Mir site is a good reference for different versions of all Nikkors.