which version of gcc do I need?

if you don't really care..

..get the patched 2.95.2.

versions

There are two versions of gcc available now for ps2 linux: 2.95.2 and 3.0.3. 2.95.2 is the version distributed with the linux kit and is probably the safest option. There is also a port of 3.0.3 here on ps2-gl.tensioncore.com[playstation2-linux.com] which has a few minor improvements and is generally stricter (which is a good thing).

patches

Just to confuse things, there are also a number of patches available that do the following:
applies to both 2.95.2 and 3.0.3:
  1. adds the syntax '0bxxxx' to describe binary constants, where xxxx is a number. So 0b11111111 is decimal 255.
  2. allows asm parameters to be named like 'asm ("addiu var, var, 123" : "=r var" (some_var) : );'
    see the gcc asm documentation
applies only to 2.95.2:
  1. fixes a bug where adjacent strings in a template expression produce garbage (like "some" "string")
  2. adds a mostly obsolete conditional assembly option...

I recommend starting off with 2.95.2 since that's the version already on the system, and I recommend patching it since the patches only add features and even fix a couple of bugs.