Thiago closed the gap to a single goal once more before Werner's second made it 4-2 to the hosts.
Hamburg gained a point thanks to Pierre-Michel Lasogga's goal in the second minute of injury time for 1-1.
Hertha are fifth after 19-year-old defender Jordan Torunarigha scored his first goal for the club in a 2-0 win at already relegated Darmstadt, with Salomon Kalou netting the opener.
Die Rothosen have not been demoted from the German top flight since the Bundesliga's inception in 1963 but they are now two points adrift in the relegation play-off place.
Thiago Alcantara halved the deficit on the hour mark, but Werner quickly restored the two-goal cushion to nearly certainly give Leipzig the win.
Robert Lewandowski equalized from the penalty spot for his 150th Bundesliga goal.
After six seasons with Bayern, it seems Boateng may be looking for a new challenge as he looks for the Die Roten board to clarify his position in the team so he can assess his situation ahead of the summer transfer window.
Lewandowski claimed his league-leading 30th on a rebound after Robben hit the crossbar, David Alaba equalized with a free kick, and Robben capped a remarkable recovery with a fine individual effort.
Aetna pulling out of Nebraska ACA market
Obamacares markets are becoming increasingly vulnerable as major health insurers exit, citing financial losses. Customers are likely still several months away from knowing for certain final 2018 rates and participation.
Leverkusen's goal difference effectively guarantees it will finish above Hamburg.
Goals either side of half-time from Branimir Hrgota and Haris Seferovic looked like handing Frankfurt victory but Jhon Cordoba, Stefan Bell, Yoshinori Muto and Pablo de Blasis all struck in the final half-hour for Mainz.
Reports in France suggested the two have not seen eye-to-eye since clashing during Bayern's Champions League quarter-final defeat to Real Madrid.
Hoffenheim heaped the pressure on Dortmund with a 5-3 victory over Werder Bremen.
Hoeness says he has already personally told Leipzig's billionaire backer, Red Bull's co-founder Dietrich Mateschitz, that RB can only break Bayern's monopoly of the Bundesliga with more experience in their ranks.
Robert Lewandowski calmly restored parity from the spot on 17 minutes, before Leipzig retook the lead with a penalty of their own from Timo Werner.
Carlo Ancelotti on Friday insisted Germany star Jerome Boateng and under-performing Renato Sanches will next season stay at Bayern Munich, who aim to assert their Bundesliga domination at title-rivals RB Leipzig this weekend.