Diogo Jota put Juergen Klopp's side ahead in the 13th minute, while Sadio Mane scored eight minutes later.
The Spanish side's troubles intensified after Felipe was sent off in the 36th minute for a deliberate trip on Mane that earned him a harsh straight red.
Manchester City moved within sight of the next round with a 4-1 win over Club Brugge of Belgium.
City top their group, a point above Paris Saint Germain, who drew 2-2 with RB leipzig.
Ajax Amsterdam moved through to the next round after beating Dortmund 3-1