Konta saved early break points but was unable to prevent Osaka from taking the first break of the match but she was able to break straight back.
The first set ended up going to the tie-break with Konta taking it to five, winning it with an ace.
Osaka had to take a medical timeout in the second but she broke to lead 5-3 and held to win the second to force a decider.
However she was clearly struggling in the third set and Konta broke twice to seal the match 6-1.
Konta will now face Anastasija Sevastova of Latvia, who was in attendance scouting her next opponent, in the next round and should she win that it could potentially set up a quarter-final with Simona Halep.
The 25-year-old said on BT Sport: "I think obviously you could tell she was struggling, I hope everything is okay with her and she recovers quickly.
"It was just important for me to stay on my own game. Even though I lost the second set I didn't feel like I did much wrong."
Former world number one Maria Sharapova makes her return from her doping ban later today.
Read the original article on Eurosport: Konta through in Stuttgart with victory over Osaka