The Pittsburgh Steelers have edged the Baltimore Ravens 26-24 to win the AFC North title and secure a playoff berth.