A topological group $G$ is called extremely amenable if every continuous action of $G$ on a compact space has a fixed point. This concept is linked with geometry of high dimensions (concentration of measure). We show that a von Neumann algebra is approximately finite dimensional if and only if its unitary group with the strong topology is the product of an extremely amenable group with a compact group, which strengthens a result by de la Harpe. As a consequence, a $C^\ast$-algebra $A$ is nuclear if and only if the unitary group $U(A)$ with the relative weak topology is strongly amenable in the sense of Glasner. We prove that the group of automorphisms of a Lebesgue space with a non-atomic measure is extremely amenable with the weak topology and establish a similar result for groups of non-singular transformations. As a consequence, we prove extreme amenability of the groups of isometries of $L^p(0,1)$, $1\leq p<\infty$, extending a classical result of Gromov and Milman ($p=2$). We show that a measure class preserving equivalence relation $\mathcal{R}$ on a standard Borel space is amenable if and only if the full group $[\mathcal{R}]$, equipped with the uniform topology, is extremely amenable. Finally, we give natural examples of concentration to a non-trivial space in the sense of Gromov occurring in the automorphism groups of injective factors of type III.