Chances are you can simply spin the spout on further. To find out, spin it off and clean both the male and female threads with a toothbrush or metal bristle brush. Spin it back on. If it goes snug to the wall, add a few wraps of PTFE tape to the pipe stub and reinstall. Some trial and error may be needed to figure out how much tape is the right amount.
If it won't go all the way, at least now you can see what you'd have to do to shorten the stub so you can. A quick de-sweat, pipe trim, and re-sweat is worth the aesthetic outcome, in my opinion.
Caulk would look crappy on a gap like that. (Caulk always looks crappy on tub spouts.) I would caulk around the pipe, though. Fill the entire void to the tile with silicone.