Cardiff City succeeded where Swansea and Wrexham had failed by reaching this season's FAW Premier Cup semi-finals.
But Cardiff, who fielded five players with first-time experience, were given a stern test by Welshpool, who had two goals disallowed for offside.
An 85th-minute free-kick from striker Jon Brown, 19, sent the Bluebirds through to the last four.
Welshpool almost equalised in the dying moments but Chris Venables' volley was superbly saved by David Forde.
Cardiff will now face local rivals Newport County at Ninian Park in the semi-finals, date to be confirmed.
Welshpool Town: G McGuigan, G Hughes, P Dowridge, D Cunnah, G Windsor, J Keegan, C Venables (capt), R Stephens, S Rogers, C Davies, R Harris.
Subs: A Shannon, I McLeod, C Webster, M Powell, D Barnett.
Cardiff City: D Forde, A Morris, D Purse (capt), A Acheampong, M Smith, K Cooper, J Carlile, A Ramsey, J Brown, T Webbe, M Green.
Subs: D Hudson, J Magennis (gk), Z Evans, A Buswell, S Wade.