Gmail and YouTube are owned by Google, but they are different services. You can use one login for all google services, the cookie in accounts.google.com will take care of it, but every login is saved in its retrospective cookie, like youtube.com and gmail.com, so each account needs to be logged out separately.