Painting around a toilet requires care and preparation, especially if the toilet is in a small bathroom with limited space, or in a recessed area. The last thing you want is the hassle and mess of removing the tank, and there's really no need to do so. With just a few inexpensive items, you can protect the toilet and ensure that you get full paint coverage in a hard-to-reach area of your bathroom.
Close the lid of the toilet. Starting from behind the bowl, wrap the bowl with plastic sheeting. You may need to cut the sheeting to size so you don't have too much bunched up at the bottom. Make sure you have a snug fit, then secure the sheeting at the base of the bowl with painter's tape. Wrapping the bowl in plastic is preferable to using just a drop cloth because you can cover the whole bowl, front and back.
Cover the toilet tank with a plastic garbage bag. Ensure that the entire back of the tank is covered, then pull any slack in the bag towards the front of the tank. Use painter's tape to secure the bag to the toilet bowl at the front of the tank. An alternate method is to cover the top, back and sides of the the tank in adhesive-backed food wrap.
Place plastic sheeting or a drop cloth on the floor behind and around the toilet.
Mask off baseboards with painters tape.
Apply paint behind the toilet with a trim or mini roller. This keeps you from smearing paint on the plastic bag on the back of the tank. While paint won't get on the tank, it wastes paint and perhaps makes clean up more difficult. Another method is to use a brush.