OR-ing power supplies (diode or mosfet)
There are ICs available to do the whole thing, including the switching MOSFETs, full isolation between inputs, etc.

For example, the PS2115A from TI can autoswitch between two inputs, handle 2A, and is currently available for US$2.15 from DigiKey. Take a look at figure 14 for what you want.