Ok, I understand what you're trying to do. It's not really as complicated as it sounds. Let's see how I can help...
When you're generating someone's profile, you should have their $uid. So all you have to do is loop through a query that selects all the $gids that go along with that $uid in my_games. Once you have the $gids, you should be able to pull out the game name from the games table. Here's an example.
echo "I play these games:<ul>";
$result = mysql_query("SELECT gid FROM my_games WHERE uid='$uid'");
while($row = mysql_fetch_assoc($result))
{
extract($row);
extract(mysql_fetch_assoc(mysql_query("SELECT game_name FROM games WHERE gid='$gid'")));
echo "<li>$game_name (GID# $gid)</li>";
}
echo "</ul>";
Make sense? Let me know how it goes.