Phase space quantization, noncommutativity and the gravitational field