West Coast have defeated Port Adelaide by two points in a thriller to log consecutive AFL wins for the first time in almost two years.