I've heard many different people say that the Gettysburg Address was a conspiracy/hoax to cover up the Union's loss. I feel like this is wrong but I don't know enough about American history to be sure.
The whole point of the invasion of Pennsylvania was for Lee to decisively whip the primary Union army. He and Jefferson Davis hoped that would bring the Union to the negotiation table. And Lee even carried a letter from Davis to Lincoln, that Lee was supposed to deliver, presumably directly to Lincoln after marching into the White House. It was also supposed to inspire the British and French to officially recognize the Confederacy.
The Union army had somewhat different objectives. It would have liked to destroy Lee's army. But simply driving him back into Virginia would have been a success, and was considered the more immediate need.
After three days of heavy fighting, the Union still held the field while the Confederate army not only withdrew from the field, they abandoned their campaign. Lee achieved none of his goals. The Army of the Potomac still existed, the Union didn't enter negotiations, the British and French didn't change their positions. But while Lee was driven back south, he wasn't destroyed, and Lincoln was again frustrated that his generals couldn't seem to achieve a complete victory in the East.
When one side achieves none of its goals and the other side achieves some of theirs, we have to consider it a victory for the second side. It was a Union victory, an incomplete one, but a Union victory none the less.