We performed an optical spectroscopy measurement on single crystals of Ba2Ti2Fe2As4O, which is a newly discovered superconductor showing a coexistence of superconductivity and density wave order. The study reveals a spectral change related to the formation density wave energy gap below TDW≈125 K, leading to the removal of about half of the multiple Fermi surface sheets. The ratio of 2ΔDW/kBTDW≈ 11.9 is considerably larger than the mean-field value based on the weak-coupling BCS theory. At the lowest temperature in the superconducting state, we observed opening of superconducting energy gaps Δ1(0)=3.4 meV and Δ2(0)=7.9 meV. The properties of superconducting state in Ba2Ti2Fe2As4O are similar to that in BaFe1.85Co0.15As2.