What took place that quite possibly saved Grant from defeat at Shiloh?

Confederate troops retreated suddenly due to heavy losses.

Union soldiers fought very well.

Buell arrived with reinforcements after the first day of battle.

General Prentiss was able to hold on to his position in the Hornet's Nest.

Reinforcements arrived from General Sherman.

Verified Answer :

General Prentiss was able to hold on to his
position in the Hornet's Nest. Together with General William H.L.
Wallace, they were able to reform and hold the lines against the Confederate
attack.  This enabled reinforcements
under Buell to turn back the Confederate attack. This ended the efforts of the
South to prevent the Union advance to the Mississippi.

Answer:

General Prentiss was able to hold on to his position in the Hornet's Nest.

Explanation:

I did a test and got this one right.