“The players, management, everyone in Derry has been through a lot this week.
“It was a hugely difficult week so perhaps this will help give everyone a lift, but even at this time our prayers are with the family following that terrible Buncrana tragedy.
“It’s a tribute to the players how they coped with all this on the night,” said Shiels.
Derry broke the deadlock in the 69th minute. Substitute Keith Ward’s cross was laid back by Barry McNamee into the path of Conor McCormack, who found the top right-hand corner of the net with a rising 20-metre shot.
Youths looked to have salvaged a point when replacement Eric Molloy cut in from the right and laid the ball across goal for Danny Furlong to rifle in from 12 metres.
But the tall Rory Patterson gave Derry their fourth win on the bounce with a looping header four minutes into additional time, leaving Wexford Youths still seeking out their first win.
The three points move Derry to the top of the table alongside Dundalk.
Graham Doyle, Craig McCabe, Gary Delaney, Lee Grace, Ryan Delaney, Aidan Friel, Chris Kenny, Danny Ledwith, Andy Mulligan, Paul Murphy, Danny Furlong.
S Last for Delaney (83), A Mulligan for Molloy (65), C Wall for Ledwith (78).
Ger Doherty, Niclas Vemmelund, Ryan McBride, Aaron Barry, Dean Jarvis, Conor McCormack, Gareth McGlynn, Barry McNamee, Harry Monaghan, Ronan Curtis, Rory Patterson.
K Ward for McGlynn (57), N Boyle for Curtiss (76).
Graham Kelly (Cork).