Leighton Baines failed to get the better of an inspired Shay Given with the set-piece attempt, but the ball came back off the post and trickled over the line after hitting the Irishman on the back of the head to win the points for Everton.
The first shot of an entertaining first half arrived via the boot of Kevin Mirallas, who opted against playing the ball out wide and instead cut into a central position and fired a shot on goal for Given to collect.
City arguably had the better of things in the opening quarter of the match, with Joe Allen in particular pulling the strings, but it was Everton who were creating the better openings as Romelu Lukaku got in behind but failed to squeeze the ball past a backtracking Ryan Shawcross.
The Toffees were again to be denied by a player on the goal-line, this time by Peter Crouch - handed a starting spot following his hat-trick in midweek - who acrobatically cleared away after debutant Williams got on the end of a deep Mirallas cross.
Home supporters continued to spur their side on as the pressure grew and grew, although Mirallas saw his half-volley pushed over the bar by Given and Lukaku - now without a goal or assist in 11 games - failed to find the target when picked out inside the area late in the half.
Everton remained on top in the early stages of the second period, with Ross Barkley dragging a shot wide of goal before Lukaku linked up with Mason Holgate inside the box, only to hit the post with just the keeper to beat.
A pivotal moment arrived moments later, as a tangle of legs between Bardsley and Williams led to referee Oliver pointing to the penalty spot.
Baines stepped up but could not get the better of Given, yet fortune was on the England international's side as the ball crossed the line.
Stoke recovered well from the setback and came close to a leveller through Marko Arnautovic, who got on the end of a flick-on into the box but saw his strike blocked by Baines onto the crossbar.
Barkley and substitute Arouna Kone both saw tame shots kept out as the match wore on, neither being able to get the better of an inspired Given, who was standing in for Jack Butland for the third league game in succession.
It was Given who was again the hero for Stoke 12 minutes from time, keeping out Barkley's latest close-range attempt, while Jonathan Walters - now without a goal in 12 games against Everton - failed to connect up the other end when picked out just a few yards from an empty goal.
The Toffees were not willing to sit back in the closing stages, creating a good opening for Yannick Bolasie which the summer signing sent marginally wide of the target a few minutes from time.
That miss would not prove to be costly, though, as the Merseyside outfit were able to hold out for the remainder to earn their first win against Stoke here in three attempts.