I know this won't help with the Galaxy Tab, but I thought it was worth mentioning anyway. you can do this on a Windows 8/RT tablet by opening Youtube on the desktop version of IE10. I just tried this on my Surface to see what would happen. If you open it in the metro version of IE10, it stops the moment you move to another app and restarts when you return to it. However if you click the button to open the tab in Desktop IE, it will continue to play in the background (you can also run the metro IE10 in snap mode next to another app and it will continue to play, too)
The problem with these platforms is that they put the apps to "sleep" whenever they go into the background, in order to save battery life. The OSes only see the browser as a browser and don't consider the fact that there is active content playing in them. The OS would need to be specifically told to allow the browser to run in the background, instead of suspending it - and I believe the only way to do that would be for the developer (Apple, Google, Microsoft, etc) to write that into a future OS update. ie. there's no way to add an exception yourself. Windows doesn't have this problem because it is a full multitasking environment.
EDIT: I also tried using an app called Youtube+. This also allowed the videos to play in the background and it s a metro app, rather than desktop-based. So at least in Windows RT, there is a way for developers to allow their applications the right to run in the background. So I would expect there would be a similar option for Android apps (not so sure about iOS). It might be worth seeing if Youtube+ is available for Android, or try some other Youtube player in the store.