In the GNOME Terminal, Bash does smart auto-completion. For example
apt-get in
becomes
apt-get install
>
In the emacs shell, it's actually emacs doing the auto-completion, not bash. If the shell and emacs are out of sync (e.g. by using pushd, popd or some bash user function that changes the shell's current directory), then auto-completion stops working.
To fix this, just type 'dirs' into the shell and things get back in sync.
I also have the following in my .emacs:
(global-set-key "\M-\r" 'shell-resync-dirs)
Then just hitting Esc-return resyncs the auto-completion.