Which browser are you using? This seems to work in Firefox:
Tools -> Options -> Privacy
Then next to the “Accept cookies from site” text click Exceptions, add youtube.com and set it to blocked.
Now I’m logged in to Gmail but not logged in to Youtube. Of course this means you won’t be able to log in to Youtube even if you want, but if you never do that then that shouldn’t be a problem.
I’m sure there’s something similar for other browsers.