Bathtub/showerhead leak, short water pipe
What you will have to do is remove the round piece that is shown in your photo. I believe it was an integral piece from the spout. The small thin O-ring that you see on the most forward section should be pressed into the tub spout for a pressure fit. Since that is what keeps it connected to the spout (as opposed to being mechanically secured) it most likely (and easily) loosened as you were repairing the spout. If you use a pipe wrench or a pair of channel lock wrenches (protect the pipe with a rag wrapped around it) it should unscrew counter clockwise. With some luck you will have removed only the spouts base and not the 1/2" pipe nipple inside the wall (you should be able to see the threads inside the wall). Re-connect the spouts base by pressing the two pieces together. Apply Teflon paste to the female threads on the bottom at tighten back in place. What is causing the water to leak is most likely: 1)the valve handle is not exactly in the off position , 2) the washers or valve cartridge needs replacing, 3) the water may not be a leak , but residual water that remains in the pipe after the valve is closed.