Something powdery & abrasive like AJAX or Comet cleaner has worked well for me, along with a grout cleaning brush. I think those powders contain bleach, though, so you may just want to use regular baking soda, which will still have the abrasive scrubbing ability but won't whiten as much. In the end, there may be some discoloration deep in the grout that you'll never really be able to scrub out.
This is ultimately why I hate having a tile shower. I'd much rather have a fiberglass shower with all smooth edges and corners -- nowhere for grime to accumulate!