We report the first results of elliptic (v2), triangular (v3), and quadrangular (v4) flow of charged particles in Pb-Pb collisions at a center-of-mass energy per nucleon pair of sNN=5.02 TeV with the ALICE detector at the CERN Large Hadron Collider. The measurements are performed in the central pseudorapidity region |η|<0.8 and for the transverse momentum range 0.2<pT<5 GeV/c. The anisotropic flow is measured using two-particle correlations with a pseudorapidity gap greater than one unit and with the multiparticle cumulant method. Compared to results from Pb-Pb collisions at sNN=2.76 TeV, the anisotropic flow coefficients v2, v3, and v4 are found to increase by (3.0±0.6)%, (4.3±1.4)%, and (10.2±3.8)%, respectively, in the centrality range 0%-50%. This increase can be attributed mostly to an increase of the average transverse momentum between the two energies. The measurements are found to be compatible with hydrodynamic model calculations. This comparison provides a unique opportunity to test the validity of the hydrodynamic picture and the power to further discriminate between various possibilities for the temperature dependence of shear viscosity to entropy density ratio of the produced matter in heavy-ion collisions at the highest energies.