Kenwyne Jones' towering late header ensured Stoke progressed to the knockout phase of the Europa League.
Dynamo Kiev dominated the first half and took a deserved lead when Matthew Upson steered Olexandr Aliyev's low shot into his own net.
But the Potters raised their game and were rewarded when Jones powered in Jermaine Pennant's pinpoint cross.
A stunning stoppage-time save by Asmir Begovic ensured Stoke only need a draw at Besiktas to top Group E.
The result had looked far from certain as Stoke, who become the first English club to progress to the last 32, were outplayed for much of the first half.
They struggled to keep up with Dynamo's quick, incisive passing and the home side were cut open several times.
Aliyev was the brightest of Dynamo's impressive forward line, firing a couple of dangerous shots at Begovic's goal, with Andriy Yarmolenko also coming close in the early stages.
So it was not unexpected when the Ukrainian side took a deserved lead - and it came courtesy of an own goal by Stoke skipper Upson.
Yarmolenko drove towards the backpedalling Stoke defence before releasing Aliyev, whose powerful low drive was steered into his own net by Upson, despite the best efforts of Begovic to keep it out.
The goal had been coming, mainly because of Stoke's inability to contain the inventive Aliyev.
Stoke continued to labour after going behind and Shevchenko should have made it 2-0 before the break, but the former Chelsea striker could only slice his left-footed shot against the outside of the post after Aliyev's piercing through ball.
Tony Pulis's side were brighter in the second half and Wilson Palacios latched onto Rory Delap's ball over the defence before forcing goalkeeper Olexandr Shovkovskiy to smother.
Moments later Pennant saw his drilled shot cleared off the line by Yevhen Khacheridi, as the visitors were suddenly unable to deal with Stoke's sustained assault.
Stoke's equaliser eventually came courtesy of Jones, who evaded his marker to head home Pennant's cross from the right, and substitute Peter Crouch was swiftly ordered to put his tracksuit back on.
The equaliser gave way to a nervy end for Stoke, who have Begovic to thank for a magnificent fingertip save from Yarmolenko in the dying seconds.
The striker's stinging effort was superbly tipped around the post by the Bosnian stopper, with the shot seeming destined for the back of the net.