A measurement of production cross sections of the Higgs boson in proton-proton collisions is presented in the H→ττ decay channel. The analysis is performed using 36.1 fb-1 of data recorded by the ATLAS experiment at the Large Hadron Collider at a center-of-mass energy of s=13 TeV. All combinations of leptonic (τ→vv with =e,μ) and hadronic (τ→hadrons v) τ decays are considered. The H→ττ signal over the expected background from other Standard Model processes is established with an observed (expected) significance of 4.4 (4.1) standard deviations. Combined with results obtained using data taken at 7 and 8 TeV center-of-mass energies, the observed (expected) significance amounts to 6.4 (5.4) standard deviations and constitutes an observation of H→ττ decays. Using the data taken at s=13 TeV, the total cross section in the H→ττ decay channel is measured to be 3.77-0.59+0.60 (stat) -0.74+0.87 (syst) pb, for a Higgs boson of mass 125 GeV assuming the relative contributions of its production modes as predicted by the Standard Model. Total cross sections in the H→ττ decay channel are determined separately for vector-boson-fusion production and gluon-gluon-fusion production to be σH→ττVBF=0.28±0.09 (stat) -0.09+0.11 (syst) pb and σH→ττggF=3.1±1.0 (stat) -1.3+1.6 (syst) pb, respectively. Similarly, results of a fit are reported in the framework of simplified template cross sections. All measurements are in agreement with Standard Model expectations.