Ilkay Gündogan scored his first league goal since April 2013 to lift Dortmund off the foot of the table.