Spain's attempt to become the first country in history to win three consecutive European Championship titles got off to the perfect start courtesy of Gerard Pique's late winner.