Twins gain ground, beat Angels 5-4