One of the capacitors - an energy-storing container - in a compartment within a switchboard room failed as the 151,000-tonne Southampton-based vessel was approaching Barcelona, a report by the Marine Accident Investigation Branch (MAIB) said.
There was a loud explosion and extensive damage to the surrounding electric panels and the vessel blacked out.
A steel cover plate was blown out into the main switchboard room but ''fortunately there were no personnel in the vicinity'' the MAIB said.
The report added that there were no navigational hazards nearby and main power was restored with 28 minutes and the ship was able to get back under way after the incident, on September 23 this year.
The capacitor was one of 12 in a harmonic filter - a device which counters variations in voltage.
The MAIB said preliminary findings of the investigation carried out by the manufacturer of the capacitor indicated that it had deteriorated gradually.
Today's report added: ''The MAIB, in co-operation with the manufacturers of the harmonic filters, the ship owner (Cunard) and subject matter experts, is carrying out a detailed investigation to find the exact technical cause of the failure on board Queen Mary 2.''
The MAIB also recommended checks be made by operators of electric-propulsion vessels that have large capacitors in harmonic filters.
The QM2, which can carry up to 2,600 passengers, was officially named by the Queen in Southampton in 2004.