This paper introduces a new loss function induced by the Fourier-based Metric. This metric is equivalent to the Wasserstein distance but is computed very efficiently using the Fast Fourier Transform algorithm. We prove that the Fourier loss function is twice differentiable, and we provide the explicit formula for both its gradient and its Hessian matrix. More importantly, we show that minimising the Fourier loss function is equivalent to maximising the likelihood of the data under a Gaussian noise in the space of frequencies. We apply our loss function to a multi-class classification task using MNIST, Fashion-MNIST, and CIFAR10 datasets. The computational results show that, while its accuracy is competitive with other state-of-the-art loss functions, the Fourier loss function is significantly more robust to noisy data.