In The Dark Knight, Harvey Dent says Jim Gordon can only say sorry after he lies to a loved one by saying they will be fine only to know they will die. But what is Gordon being asked to apologize for? Not saving Rachel in time?
When first Batman apprehend Lau from Hong Kong, Harvey Dent argued with Gordon that he will keep him under his custody but Gordon denies.
Joker forced some cops under Gordon to kidnap Rachel and Harvey Dent. Gordon failed to supervise those men under him.
And much more things which forced Harvey Dent to turn him into a bad guy. When harvey dent investigate those corrupted officers and he came to know that those cops are worked under Gordon. Which indirectly makes him responsible for all crime. Hence Gordon has been asked to apologize.
Mostly because Jim was working with the Batman when they saved him over Rachel
In the movie, we can see Two-Face going after a number of persons involved somehow in Rachel's death including cops.
As viewers, we know that it was the Batman who gave Jim the "order" to go after Rachel and leave Dent to him but Harvey doesn't know that. Therefore, he deems Jim responsible for Rachel's death.
It is also worth noting that Harvey Dent was nicknamed 'Two-Face' long before he was hurt and that is because he always had a dark side and resentment towards the corrupt police department. His resentment for the police department might have played a part in that personal attack on Jim. (This is not stated in the film but is from 'Batman the Dark knight returns' comic in which 'Two-Faced' is "cured" both physically and mentally but remains 'Two-Face' because it is who Dent truly is).
TL;DR : Jim is being asked to apologize for the unfairness of his decisions as the commissioner that "caused" (from Two-Face's PoV) his loved one's death.