The Wells set up a home tie with neighbours Rusthall in the next round thanks to goals from Joe Nwoko and Jack Harris.
Joe Nwoko set a new club record as he found the net after just 13 seconds when his looping shot gave The Wells the lead.
Rochester equalised through Adam Saunders on 24mins.
Jack Harris however secured a Wells win when he netted with 3mins of normal time remaining.
Saturday sees The Wells welcome A26 rivals Crowborough Athletic to the Culverden for Non League day.
Kick Off 3pm.