While Saints remain rooted to the foot of the table, the Fir Park Club trail only Celtic and Rangers after the on-loan Wigan attacker made amends for an earlier miss minutes before the interval.
Two minutes later Davidson had time on his side but opted to head Anthony Ralston's cross and his effort was easily held by Well keeper Gillespie.
The visitors should have snatched the lead from their first attack in the 16th minute. Only Cole will know how he managed to scoop James Scott's low driven cross over the bar from point-blank range at the back post.
Motherwell captain Peter Hartley was booked for a 24th-minute foul on Davidson and Gillespie dropped to his right to hold Tanser's low free-kick from the edge of the box.
Two minutes from the interval, former Livingston defender Gallagher played an integral role in forging Motherwell's lead. He rose to head down a Liam Polworth corner and Cole was first to react, making no mistake this time by touching a close-range finish into the net.
Saints could have levelled minutes after the restart. Ralston's driven cross caught May off balance and his stumbling touch fell kindly to Gillespie, despite protestations that he had been barged in the back.
Saints did secure a spot-kick in the 54th minute when midfielder Donnelly shoved Davidson but keeper Gillespie guessed correctly to beat out Tanser's effort. He also frustrated May before Donnelly's last-gasp red card for an off-the-ball incident which left Chris Kane on the turf.