Baldock put City in front after 21 minutes after Jay Emmanuel-Thomas beat two Gills players on the by-line before cutting the ball back.
And Emmanuel-Thomas was involved again for the Reds’ second goal in the 66th minute as his low shot was blocked before Wynter reacted quickest to slot home.
The second goal came just minutes after City had twice hit the woodwork in quick succession as a fine save from goalkeeper Stuart Nelson tipped Baldock’s back-post header on to the post before Wynter headed against the crossbar.
Gillingham’s best chances fell to striker Adebayo Akinfenwa but his headed efforts, including one just seconds after City’s opener, failed to find the target.
The burly striker was withdrawn just before the hour as manager Martin Allen brought on Danny Kedwell and Cody McDonald.
But neither could help their side get back into the game as the Robins gained revenge for the 2-1 reverse suffered at the same stage of the competition last year.