The Microsoft Knowledge Base explains how to avoid this issue, and the ports required for SMB/CIFS networking.
KB298804
It has been a long time since I really worked on a Windows computer, but I am fairly sure the firewall should have some option along the lines of "Enable File and Printer Sharing" that would automatically open those ports for you.