With Tuesday night's match in Valencia looking like going into extra-time, Bale broke and beat the challenge of Marc Bartra before poking the ball past Jose Manuel Pinto to win the game for Real.
Real had led thanks to Angel Di Maria's early strike, and they had been the better team in the first half.
But Barca came into the game in the second half and levelled just after the hour when Bartra headed home Xavi's corner.
Then it was down to Bale. Real countered off a Barca corner and Isco fed the Welshman, who rose to the occasion to grab the goal which gives him his first major honour of his career.
Barca's own record signing Neymar wasted a glorious chance to level in the final minute as he fired his shot against the post.
It marks the end of one the worst weeks in the recent history of Barcelona. Having gone out of the Champions League to Atletico Madrid, and then losing against Granada in La Liga at the weekend, the pressure was on them to beat Real, but instead it was Carlo Ancelotti's side who picked up the first piece of silverware of the season from King Juan Carlos of Spain at the Mestalla.
Ancelotti was forced to re-jig his team due to the continued absence of Cristiano Ronaldo, opting for Isco to complement Bale and Karim Benzema.
Isco was carded after three minutes for cutting down Neymar but responded with a quick through-ball which allowed Bale to attack down the left, the Wales star shooting across the face of goal and just wide of the far post.
Bale was in the thick of the action and had another attempt a minute later, shooting on the turn, but was denied by a deflection by Javier Mascherano. Just a couple of minutes later, Madrid took the lead through a precise counter.
Isco held the ball up in midfield before squaring to Bale, who found Karim Benzema on the left wing. The Frenchman played Di Maria in with one touch and the Argentinian surged into the box to shoot into the bottom corner, Pinto unable to prevent the shot creeping in at the post.
A fine block by Mascherano prevented Isco from making it 2-0, the former Liverpool man sliding across to prevent the forward from making the most of Bale's cut-back.
Bale almost provided a sensational start to the second half, bursting his way past two Barca defenders only to shoot the wrong side of the near post.
The former Tottenham hero then tried his luck from outside the area, striking the ball with the outside of his foot and just onto the top of the net.
Barca were unable to breach Madrid's defence, which was aided by vital interventions by forwards Di Maria and Isco. Bartra's solution was to have a go from range, but his shot was batted away by Iker Casillas.
Benzema then nearly caught Pinto out at the near post, and Bale headed home from the resulting corner, but the goal was ruled out for offside with the keeper out of position.
Barca then won a corner from which Bartra rose to power a header into the top left-hand corner and beyond Casillas, who conceded for the first time in nine Copa del Rey matches this season.
Bale tried to reply with a run down the left and a shot that Pinto quickly repelled, then Luka Modric saw his shot go just over.
Barca attacked with intent, although they were unable to test Casillas but with five minutes to go, Bale won the match with his rampaging run, racing past Bartra before calmly beating Pinto.
The game almost took another twist in stoppage time, Neymar smashing the post but the ball landing safely in the hands of Casillas before any Barca players could pounce.
But that was the Catalans' last attempt, and Madrid, beaten by city rivals Atletico in last year's final at the Bernabeu, were able to enjoy a happier outcome this time around.