The American hadn't dropped a set all tournament until the Spaniard romped through the second set and Williams admitted she had to fight to up her intensity levels heading into the decider.
"I think it was definitely a battle. That's the way to describe it. I obviously didn't do much in the second set, and I think I gave her a lot confidence to play better," she said.
"I wasn't really there. I wasn't really in it. My feet weren't moving. I don't know what happened.
"To turn it around I got up earlier on the changeover and started doing high knees and just stretching and doing anything to try to get my intensity back up where it needed to be."
In an uncharacteristically wild performance, Williams racked up nearly 50 unforced errors throughout the nearly two and a quarter hours of play, and she is determined to start afresh when she faces either Sara Errani or Ekaterina Makarova in the semi-finals on Saturday.
"I definitely want to cut back on my unforced errors. I had a lot unforced errors today.
"Also, I went for a lot more today than I have been in my past few matches so I think I'm going to go back to the way I have been playing and being more calm and not making as many errors as I did today.
"The fact is I was able to get through it. Tomorrow I start out at 0-0, so it's important for me to let it go and just play a new match tomorrow."
Result from the seventh day of the ATP Madrid Masters and WTA Madrid Open on Thursday (x denotes seeding):Women
Quarter-finals
Serena Williams (USA x1) bt Anabel Medina Garrgues (ESP) 6-3, 0-6, 7-5