Barcelona has lost at home for the first time this season when the Spanish league leader was stunned 2-1 by Las Palmas.