It seems the 2 sentences are different but are they? Is one correct and the other not? Sort of. "What was the gate number he was in front of?" asks the wrong question—you want "What number gate was he in front of? The other one is OK.
Is it correct to write "was overtaken" and "fell in 4th position"?- The car in 3 place