According to the cabinet site, the Prime Minister (PM) is appointed by the President. On the PM's advice, the President appoints other Ministers from the pool of MPs.
Using a combination of several ministries' organisational charts (MCYS, MND, MOE) as a standard for the entire Singapore Government, the structure for a Ministry, in hierarchical order is as follows:
So, what would happen if a candidate (who was a Minister before the parliament was dissolved) sent to a GRC fails to win the majority votes of the GRC? The Minister would then be replaced by the President on the PM's advice (see above).
Suppose a freak result happens. Would the consequences be dire? I think not. Ministries are not a one-man show. The entire Ministry is not run by just one Minister. It is because there would still be the SMS, MS, SPS and DS assisting the new Minister.