Before 1936 Real Madrid (or just Madrid CF during La Segunda Republica) had won 2 Ligas, 6 Cups, 18 Madrid championships, 4 Mancomunado Trophies and 2 Federation cups and then the Spanish Civil War started. As a team from the capital the club was hit hard (not that anyone else had it easier), most of it's players departed for their homes, some in country some out of it but that's another story.
After the end of the civil war Pedro Parages took the responsability of bringing Real Madrid back to live, the war destroyed Estadio Chamartín and most of the players were gone, the fate of the club was in danger, the team played it's first match in November 1939 in a rebuilt Chamartín, the team won it's first title of the Francoist years in 1946 (the domestic cup) and it's first league in 1953, the years before the Autharky ended and Spain and The United States restarted their diplomatic relationships... Bienvenido Mr Marshall.
So what happened between 1939 and 1953? FC Barcelona won 5 titles, Atlético de Madrid (Atlético Aviación) and Athletic de Bilbao won 4, Valencia won 3 and Sevilla won 1 but at some point in 1943 Santiago Bernabéu de Yeste became the President of Real Madrid, he was a regime's supporter but he wasn't afraid to speak his mind and he would kick high ranking officers from the Stadium.
While Bernabéu was rebuilding the team FC Barcelona (with Kubala, whom the Spanish dictatorship helped to sign), Atlético Aviación (The team of the army) and Athletic de Bilbao were dominating when there were talks about an European Cup the rest of Spanish clubs presidents (mainly the president of FC Barcelona) refused to participate but Bernabéu saw an opportunity it was then when the love affair between Real Madrid and the European Cup began, after the international success of the team the Francoist regime, opportunist by nature, saw an opportunity and used it as a propaganda tool.
In the 60's Real Madrid dominated the La Liga winning 8 titles and one European Cup (Five between 1955 and 1960) but the team only won 6 domestic cups (Copa del Generalísimo). It was in the 60's (1965) when the Francoist regime had to save FC Barcelona from bankruptcy by forgiving their debt (230 million pesetas. With an authorization signed by Franco himself), previously in 1951 their president and the regime agreed the first rezoning of terrains (where their Stadium is now) and the regime also helped in the construction of Palau Blaugrana y el Palacio de Hielo, those actions would explain why FC Barcelona gave two gold medals to Franco.