Ungar was born to a Jewish family in Poland where he worked as a teacher in a technical high school. During World War II, he fought with the Polish Army and was wounded. He returned to his home and when it was overrun by the German Army, he was able to remain hidden thanks to identification documents given to him by a Catholic friend. He was eventually uncovered by the Gestapo and was sent to the Janowska concentration camp in Lviv. He escaped and once again returned home where he was hidden by his Ukrainian landlord in a basement crawl space for nine months. In 1944, the city was liberated by the Red Army. Ungar came to America in 1946, arriving on May 20 aboard the SS Marine Flasher, the first deportee boat to reach American shores after World War II. He worked at an envelope machine manufacturing company during the day while attending school at night. In 1952, after graduating from the City College of the City University of New York with a degree in Mechanical Engineering, he obtained several envelope making machines and founded the National Envelope Corporation. He grew his company into one of the largest privately owned producers of envelopes in the United States. His memoir, published in 2000 by the University Press of America, is entitled Destined to Live. His second book titled "Only in America" is about his success in the business industry. He was honored with an Honorary Doctorate of Human Letters from Queens College and has received numerous awards for his accomplishments, both in the world of business and in the world of philanthropy, including the Ellis Island Medal of Honor, the America Business Achievement Award, being named the 1996 National Entrepreneur of the Year, the 1996 New York City Master Entrepreneur of the Year Award, the NCCJ Brotherhood Award, and the 2008 Envelope Manufacturers Association Founders Award, among others.
In 1950, he married fellow Jew Jerry Schweitzer. She was an underground supporter of the Jewish group Haganah which was fighting for the independence of Israel. She assisted by disassembling ammunition-making equipment and shipping it in pieces to Israel. They had four daughters, Florette, Joan, Denise and Rita. In addition, William and Jerry had 17 grandchildren. The Ungars were members of Temple Israel of Great Neck. Commenting on his meeting with the Pope along with other prominent Jewish leaders he stated: "Imagine that. I grew up in a small Polish village of anti-Semites and survived the Holocaust. Now, Hitler is in hell, and I get to meet with the Pope."