This colloquial phrase means that the final outcome of an event cannot be predicted until it has come to a conclusion. The phrase is usually used when the event is coming to a conclusion, and it cautions against assuming that what is currently happening is the definite outcome.
The imagery of this phrase typically refers to the stereotype of an overweight soprano in an opera. Specifically, Wagner's opera Der Ring des Nibelugen's last part depicts an overweight opera singer whose twenty minute piece leads to the end of the opera.
The first recorded use of this phrase is attributed to Ralph Carpenter's article in the Dallas Morning News in March 1976.