Mikel Arteta’s side join Manchester United into the last four of the competition.
The hosts thought they scored the opening goal inside 10 minutes through John Lundstram‘s header but the VAR ruled it out for offside.
United goalkeeper Dean Henderson almost scored a bizarre goal from a clearance but the ball went narrowly over the bar after 56 minutes.
John Egan thought he had equalised minutes later but the goal was ruled out for offside after McGoldrick’s touch.
Basham also missed a golden chance late on when he missed a header inside the box.
The hosts levelled with three minutes remaining when Arsenal failed to clear from a throw-in and McGoldrick scored from close range.
“Today we didn’t give up, even when they got the equaliser because you have to prepare for the extra time anyway,” Arsenal’s Shkodran Mustafi told BT Sport. “We believed until the end and we got rewarded.”