It is possible to do but I'd highly suggest you go a bit bigger like 10-15 gallons. The reason for this is I really don't believe in putting any saltwater fish in a 5 gallon tank as it's just so small. Some shrimp would be fine in a 5 though. I'm currently running a 10 gallon reef with a pair of baby clownfish and in the future I'll have a small colony of sexy shrimp.
Key to small saltwater tanks is setting it up right the first time and then keeping up on water changes and water quality.
So making sure you have good clean sand, fully cycled live rock and making sure you do a weekly water change will set you off for succes.
Another big thing is reading everything you can about nano tanks and making a plan for exactly what corals you want and what fish and making sure they will all fit and work. It's a small space so you really have to make sure everything gets along.
As for anemones they can be tricky but they are possible to care for in a small tank however most of the time it's best to have your tank set up for 9-12 months before trying to add an anemone since they require a mature tank to do really well.
Other corals can be added much sooner however so the tank can have color way before the 9-12 month mark.
But you need to cycle the tank first then add the fish you have chosen and let them settle in.
Then you can see about corals once everything is settled out. Again reading and making a plan you stick to is the best way to make sure the tank works and everything lives.
A lot of people start and then end up leaving the saltwater side because things die off and it's usually because they try to push things to fast and don't take time to read and learn and plan before starting. Saltwater is a big adventure and rushing any part of it is a recipe for disaster.
If you do start this I'm sure you will have a lot more questions so no matter what it is feel free to ask on here.
You can also pm if you have other questions