In the song "Mr. Blue Sky" by Electric Light Orchestra, we can hear a tune towards the end that sounds like an opera song (starting at 3:32).
Was this tune invented for the song or does it come from another, maybe more classical piece of music?
The tune was written by Electric Light Orchestra front-man Jeff Lynne. For evidence, we have the songwriter copyright for BMI, which lists Jeff Lynne as the sole composer. In addition, the extensively researched website JeffLynneSongs.com has the following information about what they call the Concert Coda of "Mr. Blue Sky":
The closing part of the song, where the song change's tempo and the lyrics stop, is not technically part of Mr. Blue Sky. Rather, it as actually the uncredited ending to the "Concerto For A Rainy Day" instead. Jeff Lynne even stated in 2012 regarding his rerecorded version of the song that it was not really part of the song, stating: "I didn't do the double ending [the Concerto ending] there 'cause that was part of a suite when I originally did it. And it didn't sort of make sense to me to not be part of that suite." This coda was not included on the USA single release, nor the 2002/2012 rerecorded version. However, it was included on the UK single and several subsequent compilations.
The coda also makes a call back to earlier in the complete "Concerto For A Rainy Day", including a melody line from Big Wheels, the second song in the concerto. At the end of Standin' In The Rain and leading into Big Wheels, a vocoder speaks "Big wheels, keep turning; they turn for ever and ever". This melody is repeated in the coda, first in the strings, then again in piano (with a variation to end the section).
"Concerto for a Rainy Day" occupies side 3 of the ELO album Out of the Blue. More info on the concerto can be found here on Wikipedia. Note as well that Jeff Lynne is the sole credited composer of "Concerto for a Rainy Day" and for the Out of the Blue album as a whole. ELO's whole shtick was a melding of classical music and pop music, and a lot of their other songs have similar classical elements to them as well.