AYR: Cuthbert; J. Robertson, Campbell, Smith, Malone; Trouten, Burke (Tiffoney 68), Geggan, McGowan; Nike Flyknit Air Max 2015 Oreo
Queens boss Gus MacPherson claimed: "If you take out the first 25 minutes, we controlled the game but we lost to set pieces."
Dumfries sub Danny Carmichael was almost the hero with his first touch after replacing Alan Johnston off the bench in 65 minutes.
Ayr United's Martyn Campbell has last laugh on his brother Mark
There was no hint that extra time would be needed as Ayr went close inside 33 seconds. Michael Moffat sent in a great cross from the right but Gareth Wardlaw's header was just too high.
"This cup isn't really my priority this season but I felt a victory against another First Division team would give us a psychological boost."
QUEENS: McKenzie; C. Reid (A. Reid 91), Higgins, Nike Air Max Tavas White Cool Grey Wolf Grey
Queens at last came to life and Kevin Smith was only inches out when he poked the ball past the inrushing Kevin Cuthbert after a through ball from Craig Reid.
Ayr missed a great chance three minutes later when a cross from McGowan picked out Campbell at the back post but the stopper failed to connect.
Boss Brian Reid admitted: "It's another clean sheet and that's a good habit. It's another testament to our fitness against a full time club that we finished strongly.
The same pair combined again in 12 minutes but Moffat's shot was Wardlaw's pass Nike Air Max Tavas Dark Blue
was touched past by McKenzie.
McKenna, Campbell, McGuffie, Johnston (Carmichael 65), Simmons, Smith (Clark 76), Brighton, McLaughlin. Unused subs: Atkinson, McShane.
But it was all settled in extra time when Campbell and Geggan came up trumps although ex Ayr man Scott McLaughlin hit the bar for Queens.
Moffat (R. Robertson 113), Wardlaw (Roberts 64). Unused subs: McWilliams, Armstrong.
The youngster looked certain to score but his shot from point blank range was smothered by Cuthbert to let Ayr off the hook.
With seconds of normal time remaining, Moffat should have won it for Ayr Nike Air Max Thea Neon Lime Green but he headed over from only a couple of yards out.
Air Max Tavas Leather Cargo Khaki
Mens Air Max 2015
Air Max 2015 Grey And Green
Air Max Red And Black 2015
Air Max Thea Mauve
Nike Air Max Tavas All Red
Nike Dunk X Dover Street Market
Nike Uptempo Mens
Nike Air Max 2015 Black Grey
Nike Men's Kd V Elite Basketball Shoes
Air Max Tavas Black Junior
Nike Blazer High Top Sneakers
Nike Air Max Thea Womens Gray
Nike Air More Uptempo Gum Bottom
Nike Air Max Thea Camouflage