Either way is plausible. Myself, I'd paint last for the cleanest lines. With even a modicum of care and preparation with masking the tiles with tape and thin plastic drop cloths, you won't get any paint on the new tile.
Before you go through the fun of ripping out the tile, is it in decent structural shape? If so, you might join me in being shocked and thrilled with what tile refinishing can get you with a big bang for thebuck. I had some ugly blue/green tile and very stained grout refinished white, and it looks incredible. The local guy used this process:
Best Regards,
-- Todd H.