Dani7 - sometimes antivirus programs like Norton include firewall-like features that prevent network devices from accessing the support program on your computer that Home Sharing needs to work. The iTunes support program is called "Bonjour", and on Windows PCs, it's usually found at C:\Program Files\Bonjour\mDNSResponder. Antivirus programs' firewall-like features can be frustrating because they aren't active all the time. Unlike proper firewalls that act as, well, WALLS, the anitvirus program's "firewall-like" feature does "random patrols" and shuts down things it perceives as threatening -- including Bonjour/mDNSResponder -- so sometimes Home Sharing will work for awhile, then appear to quit for no reason. It just means that the antivirus program awakened, did a patrol, and shut off Home Sharing. Sometimes the antivirus program will remain awake for a time, so restarting your ATV2 or restarting iTunes won't always restore your connection. (It will be shut off as soon as you turn it on.) I solved my problem, similar to yours, by looking through my antivirus program for an option that set it to ignore or exclude programs from its patrols. On Norton Antivirus, I opened Norton, chose "settings", then "miscellaneous settings", then "program exclusions", then I used the resulting pop-up browser to select mDNSResponder, then clicked "apply". I added "iTunes" to the this ignore list, as well. Then I clicked "OK" and closed back to my desktop.
I am now able to reliably access my iTunes library on my ATV2 via Home Sharing, and it has remained working for days now. Home Sharing DOES seem to time out after many hours of inactivity. Restarting iTunes on your computer seems to restore it. Don't worry if it takes a moment or two for the connections to re-establish.
I know that "antivirus program" does not sound like "network defender program", so you wouldn't think an A-V program would have firewall-like features, but mine did and it caused me much grief. Who knew my doctor was also a trigger-happy cop?
I hope you also tried all the suggestions found at
http://support.apple.com/kb/ts3509. Those are the must-do's. Good luck, and let us know how it goes.