© PA Photos
Then the visitors were reduced to 10 men when Cheick Tiote was sent off for a studs-up lunge on Steven Fletcher.
Craig Gardner almost levelled from a 35th-minute free-kick before Ba almost doubled the lead with a spectacular bicycle kick which went not far over.
Fletcher had a good chance to level at the start of the second half but his header from a Sebastian Larsson cross went well wide.
Larsson himself dragged a 25-yard effort wide of the post after 69 minutes as Sunderland continued to press for the equaliser.
Five minutes later Ba could have wrapped up the result but after getting through his shot from wide missed the target.
Louis Saha came close before finally Sunderland were level, O'Shea flicking on a free-kick which diverted in off Ba for an own-goal.
Despite continuing to push, Sunderland could not net another goal to claim all three points.