The Curiosity rover has a compact X-band high-gain antenna (HGA) that allows for low data rate communication directly with Earth, but is used mostly for higher data rates to spacecraft orbiting Mars, which then relay the data back to Earth with their much larger dish antennas.
From Section 2.2, Surface Operations of Article 14 of the DESCANSO Design and Performance Summary Series Mars Science Laboratory Telecommunications System Design one can see that the HGA needs to point in the correct direction within a few degrees;
The HGA sits on a 2 degree-of-freedom gimbal, with 5-deg system pointing accuracy (including rover attitude knowledge), and is 0.28 m in diameter. Table 2-4 shows that the downlink gain is about 4 dB lower and the uplink gain about 3 dB lower, at 5 deg off boresight.
How does Curiosity get its "rover attitude knowledge"? Also, since the position of Earth is moving with respect to Mars, as is that of the satellites around Mars, How does Curiosity know how to slew the antenna correctly in real time? Does it cary an ephemeris which is updated from time to time via uplink?
above: Curiosity's High Gain Antenna (articulated dirty hexagon). Cropped from here.
below: Curiosity's High Gain Antenna gain in uplink and downlink modes, from MSL Telecommunications System Design.