Germany captain Manuel Neuer denied former Bayern Munich teammate Xherdan Shaqiri with the first big chance in the fifth minute, but Gavranovic scored from the resultant corner after the home side failed to properly clear.
Mario Gavranovic and Remo Freuler gave the Swiss a buffer before Timo Werner replied in the 29th and Kai Havertz equalised in the 55th.
Midfielder Toni Kroos made his 100th appearance with Germany.
Germany substitute Julian Draxler might have created a late victor with some good work to reach the end line, but he managed to miss his teammates when he cut the ball back. We started the game poorly, but we showed real character to come back, which was good to see.
Momentum swung between the sides in a frantic encounter at RheinEnergieSTADION on Wednesday, with Germany coming back from a two-goal deficit.
Timo Werner narrowed in the 28th minute, and took a break in the guest lead.
Germany's efforts paid off in the 55th minute when Havertz rounded off his solo run with a well-placed shot past Sommer to make it 2-2.
It meant Germany have conceded six goals in Cologne in the space of seven days.
The Germans came back again when Werner turned provider and threaded a pass to Gnabry, who deftly flicked the ball past Sommer with half an hour to go to equalise for the second time.
The block in the second match, Ukraine surprised Spain by a goal of 1-0.
The almost 15,000 fans who were allowed entry to the Kyiv Olympic Stadium celebrated loudly as Tsygankov struck the net from outside the area after a through-ball by captain Andriy Yarmolenko completing a counterattack in the 76th minute.
The goal was wildly celebrated by the whole Ukraine team with fans spaced out across the stadium, and the hosts taking advantage of UEFA regulations allowing supporters back at certain matches in an easing of coronavirus restrictions.
In D1, Malta recorded their first away win in more than seven years as Steve Borg sealed victory over Latvia seven minutes into added time.
The Ukraine squad had been hit by a host of coronavirus cases before being trounced 7-1 by France in a friendly in Paris last week, and Andriy Shevchenko's side then lost 2-1 at home to Germany at the weekend.
They were fortunate not to fall behind on several occasions against Spain, with goalkeeper Georgiy Bushchan doing well to tip over a Rodrigo Moreno header early on.
Yet the visitors were soon undone down the other end by some lax goalkeeping from De Gea and were left to dwell on a shock defeat in the stadium where they had beaten Italy 4-0 in the Euro 2012 final.
Spain and Germany both had setbacks in the Nations League on Tuesday.