The visitors, with captain Sergio Ramos earning his 150th cap, went ahead when Rodrigo Moreno timed his run perfectly to pick up a superb through ball from Andres Iniesta and beat 'keeper Marc-Andre ter Stegen in the sixth minute.
Spain, who host Argentina on Tuesday in Madrid, are now 17 games unbeaten while Germany's run is 22 without defeat as they prepare to play Brazil in Berlin, also on Tuesday.
"We played against the best of the world champions at (their) home".
Thomas Muller leveled it up for the Germans courtesy of a stunning strike.
"If we were to play Spain at the World Cup, it would be a very different game and we know they are a top team in every respect".
Germany and Spain faced each other in an global friendly this evening.
La Roja almost got a second goal after a string of delightful passes played in David Silva, but his momentum took him past the ball and he was unable to properly control.
The Mannschaft were ferocious to start the second half and a blast by Julian Draxler forced a big save from De Gea as the match turned into a dual between two of the world's best goalkeepers.
Only a great Ter Stegen save denied Isco, but the Germans counter-attacked immediately and De Gea had to palm away a shot by Gundogan.
Germany went agonisingly close to taking the lead on 65 minutes when Toni Kroos rattled the crossbar from the edge of the box.
"It will be a game in which both teams will want to show what they can do", said Loew.
"Both teams will have more to show by the time the World Cup comes around".
Inter Milan full-back Miranda scored the opener while Barcelona midfield pair Philippe Coutinho and Paulinho scored one apiece. Germany are extremely fast and strong.
A flurry of substitutions interrupted the flow of the match in the second half but Spain still had sights of goal with a stretching David Silva finding the side netting from a Marco Asensio cross before Diego Costa had a good chance blocked.
There are just three months before the World Cup kicks off in Russian Federation, and while Loew expects both teams to impress on Friday he also knows neither will be keen to put all their wares on display.
IL cities to join 'March for Our Lives' protests
Hundreds of thousands of people, including Houstonians, are expected to attend the "March For Our Lives" event in Washington, D.C. Ankit Jain, a Columbia Law student, is among those in New York City who took on the organization of the March for Our Lives .