The Los Angeles Lakers edged out the Golden State Warriors in an instant classic to seal their place in the NBA playoffs.