Danny Johnson and Carl McHugh twice had the Steelman ahead but Kyle Lafferty's double and an Ovie Ejaria goal made it 3-2 to the visitors before half-time. Hartley had the final say right at the end to earn Well their first point of the season.
In the day's later game, Celtic beat Hamilton Accies 1-0 at Parkhead with a goal from returning defender Dedryck Boyata.