The de Havilland Comet quickly comes to mind, with the airplane grounded after two catastrophic break ups in flight. The Comet was returned to service once the problem had been identified and corrected in 1958. Too late, however for the airplane to be a commercial success as the Boeing 707 had captured most of the commercial jet market in the intervening time.
So to was the McDonnell Douglas DC-10, which was grounded due to a faulty cargo door design, leading to two fatal accidents, but after operators implemented the required Airworthiness Directives from the FAA, the airplane was returned to service.
In fact many well known airframes have been temporarily grounded during their service lives then returned to service, including, but not limited to:
Several aircraft were nearly grounded and faced public disfavor for a period of time thereafter. The Boeing 727 was nearly grounded after 3 727-100s crashed in 1965, killing 131 people. So, too, was the BAC 146 'WhisperJet', which was nearly grounded by the British government in 2000.
Military aircraft, too, have been temporarily grounded due to defects or service problems. Lockheed's F-22 was grounded in 2011 after multiple pilots suffered hypoxic symptoms from the plane's malfunctioning OBOGS system. The F-35 was temporarily grounded last November after a crash of an F-35B near Beaufort, SC.
Despite the best efforts of OEMs to conduct a rigorous and thorough development and flight test program to ensure a safe product, many potential problems simply can’t be identified until an incident or accident occurs in the fleet. It’s virtually impossible to foresee every potential safety concern with a product that contains 4 million parts, 6 million lines of software code, terabytes of engineering data and tens of thousands of pages of operating protocols. All of which must be able to function in perfect harmony and unison, without any conflicts. Unfortunately much of what we know about aviation safety was paid for in the lives of the less fortunate. Engineering OEMs strive to build better machines with each generation building upon the lessons learned from the past, but it’s not totally foolproof.