Well, a quarantine tank is not necessary ... but without it, you run the risk of disease (or death) striking all your fish, when you add just one new one. Not only is this Bad, but it can also end up costing you more than the cost of a quarantine setup (depending on what kinds of fish you have). Also, if a disease like ich does strike, and you're suddenly in "hospital tank" mode, you'll be treating 20 gallons of water, instead of a smaller volume, making your medicine costs higher.
Lastly, some diseases are best treated with the fish in isolation -- again, it's cheaper to medicate a smaller volume of water, and some times medicating all your fish is unnecessary, and causes unneeded stress. In this case, a quarantine tank often serves as a hospital tank, and its initial "startup cost" is somewhat offset by lowered "operating costs".
So, it's a question of risk vs. cost.
A five gallon might work, depending on the size of fish you expect to have in there (and how many at one time).
Personally, though, I'd look into a 10g setup. You could set up a 10g Q tank for about $40-50, and a 5g probably wouldn't be noticeably less expensive -- unless you go with a 5g "Minibow"-type self-contained unit, but those usually come with UGFs, so the "hang the extra filter in the big tank" idea won't work. Also, if it comes time for the Q tank to serve as a hospital tank, you'll find that most medicines are dosed for 10 gallons, which makes a 10 gallon tank a lot more convenient (although, granted, a bit more expensive in medication) -- many meds come in solid form, and you won't have to worry about halving a pill, or disc.