Police spokesman Jasper Pettersson told The Local.se the train left the tracks after its last stop and crashed into the first-floor kitchen of one of the building's three apartments, causing severe damage.
"The woman started driving the train from the Neglinge train station, which is two stops from Saltsjobaden," where the crash occurred, Pettersson said.
No other passengers were on the train at the time, but a woman was trapped in the wreckage for two hours before rescue crews managed to extricate her.
"We still don't know why she was in the driver's seat or whether the incident was an accident," Pettersson said. "There's a police investigation underway and we're waiting for them for clarification."
The woman was flown to Karolinska University Hospital for treatment of what emergency workers described as "serious" injuries, The Local.se said. She was ordered detained on suspicion of public devastation.
A spokesman for Arriva, the company responsible for operating the line, called the incident theft.
"It was a cleaner who for unknown reasons stole the train," Arriva spokesman Tomas Hedenius told Aftonbladet. "We're investigating how it could have happened."