Everybody knows Ctrl-Z as undo, and in a terminal that one pauses your program instead. So most people assume the bash prompt has no undo at all. It does, it is just on a key nobody would guess.
Readline, the line editor bash uses, has an incremental undo bound to Ctrl-_ (Control and underscore). It is also on Ctrl-x Ctrl-u, which is easier to reach on some keyboards. Every press takes back one more edit on the line you are typing.
Ctrl-_ # undo the last edit
Ctrl-x Ctrl-u # the same, other key
Alt-r # undo every change to this line at once
Where this shines is after a cut that went too far. Say you typed
rsync -av --delete /mnt/user/documents/ /mnt/disks/backup/documents/
and pressed Ctrl-W a few times to remove the last path, but went one word too far and lost the source folder as well. Press Ctrl-_ and the words come back, one step at a time. The same goes for a Tab completion that filled in the wrong file name. One undo removes it again.
Alt-r (revert-line) goes back to how the line looked before you started changing it, which helps a lot when you pulled an old command from history and edited it beyond recognition.
A few caveats. Undo works per line, so once you press Enter that history is gone. On many keyboard layouts the underscore needs Shift, so it becomes a three-key press, and not every terminal app passes it on. If yours doesn’t, use Ctrl-x Ctrl-u. And for Alt-r on a Mac, either set Option to act as Meta in the Terminal profile or press Esc and then r.
Further reading: Some miscellaneous readline commands (GNU Bash manual), bash(1) manual page