I am thinking of buying a new copy of GTA 4. It says at the top of the box, "Games for windows Live". Does this game come with a code that activates/connects it with my steam account so I can connect and play with my friends?
No, Unless they remove GFWL and replace it with steamworks instead.
I would recommend staying away from GFWL games for the time being because of the following news. It basically means there wont be anymore servers to play on once they shut down from what I read.
A quote from the following article
"If this deleted update is accurate, however, there is one big concern: presumably, any game currently using GFWL will need to patch it out and replace it with Steamworks or its own system to continue working after the 2014 shut off date. That’s Dark Souls, Street Fighter IV, BioShock 2, Grand Theft Auto IV, and more. Eep."
Reddit discussion of which games will be ported to Steam from GFWL. http://www.reddit.com/r/Games/comments/1noorr/list_of_gfwl_games_being_ported_to_steamworks_and/cckw21e