If you can get a roll of "garden fence" plastic, measure the diameter of your pot or barrel and cut a piece to fit plus a couple of inches.
If you haven't planted seeds yet, just lay the fence fabric on top of the soil and plant right through it. I hold the fabric down with plastic tent stakes, just to get it to lie flat. The seedlings will come up through the spaces with no problems. Or plant the seeds first and then staple the fence fabric to the rim of the pot or barrel if you want to keep the fence off the soil surface.
If you have a plant already in the pot, cut a slit in the fence fabric and a circle the size of the plant (think keyhole here), and carefully place the fabric either on the soil surface or on the rim and staple it down.
I've done this both ways, and it does work! If the cats or other critters have already discovered your pot, you can also spray the outside with Tabasco sauce or other hot pepper sauce as an added deterrent.
The plastic does degrade after a few years, but it is easy to replace! You could use chicken wire if you have that already, just be careful of the wires poking.
Thank you Ellen for a great suggestion that doesn't harm the curious animals. On a side note...my last name is Mahaney!
When planting on the ground with seed or bulbs I use this trick. I get the flat's that come from green houses. The kind that have the holes in them like plastic mesh. Then I get the things that are like huge wire staples.