If you're speaking in general, this bit isn't really true. Any modern application - including a game - is going to spend a considerable amount of time (I've heard an average figure of 80%, but it's probably wildly variable) in system API calls/frameworks. Hence even a well-written programme is heavily dependent on the quality of the implementation OpenGL, OpenAL etc.
Plus, every modern OS is going to have a multitude of other processes running; and the degree to which the game is going to have to compete with other processes for system resources has a major impact on game performance.
If you're speaking specifically about OSX v Vista, it's hard to say, since then the quality of the game implementation/port is variable, as you say.
As an aside: I remember looking at the 3D wireframe Java examples on an old IBM PowerPC workstation (AIX, 66MHz PPC 601) and the performance on them was only matched on any MacOS machine when the 300MHz+ G3 machines came out. This was with identical source code, hence the difference was OS + Java implementation. Gives you some idea how much difference the OS can make.