The flag was introduced 1955 as the flag for the Council of Europe, and subsequently adopted by the European Union in 1986.
The number of stars was a matter of compromise, not one of inspiration.
- Using 15 stars -- the number of states in the Council of Europe at the time and the initial proposal -- was not accepted by Germany as it would have cemented the Saar Protectorate as a state.
- Using 14 stars was not accepted by France and the Saar, because it would have cemented the Saar region not being a state.
- Using 13 stars was considered unlucky.
- Using 10 stars for the 10 founding states was not accepted as it would have given those 10 special status.
- Using 1 star was considered too similar to the back-then flag of Kongo-Léopoldville.
So they settled on 12 stars, "the symbol of perfection and completeness and bringing to mind the apostles, the sons of Jacob, the labours of Hercules, the months in the year, etc." (CoE website)
That an explicitly Christian inspiration for the number twelve was voiced at that time is hugely unlikely, as Turkey had rejected the use of the Paneuropean Union flag due to the use of a cross.
(Europaflagge -- Geschichte on DE:Wikipedia) -- (Flag of the Council of Europe on Fahnenversand.de quoting a CoE document (currently unavailable))
As for the blue background, that was already present in the earlier flag of the Paneuropean Union, and featured strongly in the various suggested designs.
That being said, the designer -- Arsène Heitz -- claimed such an inspiration post factum in 1987. Paul M. G. Lévy, then Director of Information at the Council of Europe responsible for designing the flag, denied being aware of such connotations, and points out that Heitz did submit a lot of designs, including the 15-star variant.
(Flag of Europe -- Marian interpretation on Wikipedia)