The achievable rate of digital communications systems can strongly depend on the analog-to-digital conversion at the receiver. It is hence important to adjust the gain control at the receiver in such a way that the performance degradation due to the analog-to-digital conversion is as small as possible. This paper studies the concept of an optimal gain control to maximize the achievable rate of single-carrier systems that employ analog-to-digital conversion with uniform quantization. Transmission of complex-valued symbols is considered, and a phase offset between transmitter and receiver is taken into account. The optimal gain control derives from the average mutual information between the transmitted symbols and quantized received samples. Allowing for a small tolerance of the achievable rate, it is possible to adequately adjust the gain control even with limited accuracy.