The Tottenham winger earned a converted a controversial penalty before scoring a wonder-strike from 25 yards with only two minutes remaining in their World Cup qualifier
The Spurs midfielder was on song throughout, and earned a penalty despite appearing to clip his own heels and go down, but stayed calm to convert from the spot before unleashing a devilish strike into the top corner late on.
Chris Coleman went with an XI including first-choice players such as Bale and Ramsey, with new captain Ashley Williams starting at the heart of the defence, but was without Wayne Hennessey and Boaz Myhill.
Scotland made major changes to their starting line-up, however, with the addition of Manchester United midfielder Darren Fletcher for his first appearance in almost a year for the national team, and his namesake Steven starting up front for the first time in nearly two years after a falling out with boss Craig Levein.
German referee Florian Meyer was getting involved in the action early on, penalising David Vaughan and Scott Brown for tackles in the opening five minutes, and making it clear that any more fouls from them would result in bookings.
Wales were dominant early on, with Bale cutting in from the right and curling an effort just past the far post with Alan McGregor scrambling.
The hosts came close again through Steve Morison, who headed inches wide from a Bale cross at the back post, and the miss proved costly as Scotland scored seconds later.
McGregor's goal kick was headed on by Steven Fletcher after a great leap that saw him beat Williams in the air, and James Morrison ran through unmarked to fire low into the corner.
Wales continued to cause problems through to half-time though, with Bale tormenting Berra and Danny Fox on the left side of defence, but they weren't troubling McGregor, with some inaccurate shooting.
Charlie Adam replaced the booked Brown at half-time in the only change for either side, with reports suggesting that the Celtic midfielder suffered a recurrence of a hip injury.
The hosts were dominant in the second half, and had three penalty shouts turned down. The first two were rightfully waved away by Meyer, with the second seeing the Scottish players ask for another booking for Ramsey for diving.
However, the third was about as blatant a penalty as you're likely to see, with Berra hauling sub Craig Davies to the floor, but was again not given.
However, Ramsey then compounded the decisions going against them by missing the best chance of the match. He was clean through on goal, with Bale for company, and as he bore down on the on-rushing McGregor, he elected to chip it over the keeper, and incredibly sent it wide with the goal gaping for his team-mate.
Sunderland striker Fletcher then seemed to have a goal disallowed in controversial circumstances, with Adam's cross adjudged to have gone out of play despite not crossing the line.
And minutes later, the hosts were level. Bale was again at the heart of it, running past the defence and seemingly clipping his own heels with Shaun Maloney not making any contact. The referee pointed to the spot though, and the Spurs winger slotted home.
And with two minutes to go, Bale snatched three points for the hosts, smashing a thunderous effort into the top corner from 25 yards.