I think Tom must've met Gun in prison before (Around ch-588 when he states that he has a feeling he might die).
Then he must have asked for a favour to Gun due to which Gun will come back after current arc. Possibly during Tom's funeral.
u/Revolutionary_Gap128 — 5 days ago