I'll contact you in advance when I come to visit.

Literal

Visit [time-とき-は] in-advance contact-[polite-します]

The pattern [dictionary-form]+ときは means 'when X (happens), then Y'. 前もって (まえもって) is an adverb meaning 'in advance, beforehand' — equivalent to 事前に but more colloquial. The clause structure is stripped; subjects and implied 'you' are all omitted.