Scott McDonald followed up his equaliser against Kilmarnock last weekend to put relegation-threatened Motherwell in front when he slotted home eight minutes before half-time at Pittodrie on Friday.
Aberdeen responded after the break, though, and Ash Taylor headed home a Niall McGinn corner to equalise after 50 minutes, then a mix-up between Motherwell defender Louis Laing and goalkeeper George Long gifted the home side the lead a couple of minutes later.
Laing attempted to head the ball back to Long, but nodded beyond the keeper and Adam Rooney took advantage to secure all three points with his 24th goal of the season.
Celtic will get the chance to restore their advantage at the summit to six points when they travel to Dundee United on Sunday.
Motherwell will be bottom of the table if St Mirren pick up at least a point at Kilmarnock on Saturday.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.