Barkley missed another penalty with four minutes of the half remaining but, after Bath skipper Michael Claassens was shown a yellow card for a high and early tackle on David Strettle, Quins fly-half Nick Evans made no mistake with two penalties to give his side hope at the interval.
Wigan were under intense pressure with their Premiership survival at stake, and they were placed under even greater strain with 16 minutes left when McCulloch was sent off for a foul on Michael Tonge that brought him a second yellow card.