How to detect IR pulse using phototransistor and voltage comparator (subtracting constant light)
The secret of successful IR transmissions in ambient light conditions, with it's combined many mixed frequencies, is modulation. The transmit source produces an on/off carrier frequency and then "information" is introduced on this carrier by switching the carrier itself on and off at some lower frequency with a recognizable pattern.

The receiver uses a band pass filter tuned to the transmitter carrier frequency that is then able to recognize the "information" modulation and output a waveform that represents that information.

The whole concept is very similar to how a radio channel can work despite the fact that the ether is full of thousands of radio signals.

The IR transmission scheme I describe is exactly the same as common TV remotes work.  You could use an old TV remote as your IR source and then get an IR receiver module that has all the receiver logic built  into a single chip. Check out something like a TSOP1738 and other similar devices.