Fred gave the visitors a 3-2 lead in the 70th minute before Anthony Elanga wrapped up the points late on.
Goals from Harry Maguire and Bruno Fernandes had put the Red Devils 2-0 up at the break.
But Leeds levelled through quickfire goals from Rodrigo and Raphinha shortly after the restart.