Do you have another executable file of the same name elsewhere in your $PATH? If so, it's possible that bash is executing the wrong executable because it uses a hash table to avoid extra $PATH lookups (see Command Search and Execution).
For example, suppose your $PATH is /opt/local/bin:/usr/bin, and you have grep installed in only /usr/bin. When you execute grep, you get the obvious result:
$ echo $PATH
/opt/local/bin:/usr/bin
$ which grep
/usr/bin/grep
$ grep --version
grep (GNU grep) 2.5.1
Now suppose that you install a newer version of grep into /opt/local/bin, which is earlier in your $PATH than /usr/bin. Because which always does the full $PATH lookup each time, but bash keeps a hash table, bash still thinks that the command grep maps to the one in /usr/bin:
$ which grep
/opt/local/bin/grep
$ grep --version
grep (GNU grep) 2.5.1
$ /opt/local/bin/grep --version
GNU grep 2.6.3
You can use the type builtin to diagnose this problem. type will tell you if a command is a shell builtin, an alias, a function, a keyword, or an executable file. If the latter, it tells you the full path to the executable:
$ type grep
grep is hashed (/usr/bin/grep)
So how do you fix this? You can use the hash builtin to manipulate the hash table (type help hash for more information). If you just want to fix one entry (grep in this case), you can do hash -d grep to say "delete the hash table entry for grep", in which case the next time you execute grep, it will search the full $PATH as expected. If you want to clear out the entire hash table (say, if you just installed a large amount of new software or you changed your $PATH), then use hash -r to empty it.