Are we able to determine whether people are saved or lost upon their death?
We are in no position to assess someone's state of heart nor their destination upon death. A person may be a believer, who rebelled against the Lord in a severe and lasting way. If so, then that person was welcomed into the Lord's presence in the manner Paul describes in 1Corinthians 3:
1Cor. 3:12 Now if any man builds on the foundation with gold, silver, precious stones, wood, hay, straw,
1Cor. 3:13 each man’s work will become evident; for the day will show it because it is to be revealed with fire, and the fire itself will test the quality of each man’s work.
1Cor. 3:14 If any man’s work which he has built on it remains, he will receive a reward.
1Cor. 3:15 If any man’s work is burned up, he will suffer loss; but he himself will be saved, yet so as through fire.
If someone never accepted Christ as savior in a sincere way, and after a period of living as a cultural "Christian," they gave up the act and returned to their true nature. If so, then that person was demonstrating the truth that Peter taught:
2Pet. 2:20 For if, after they have escaped the defilements of the world by the knowledge of the Lord and Savior Jesus Christ, they are again entangled in them and are overcome, the last state has become worse for them than the first.
2Pet. 2:21 For it would be better for them not to have known the way of righteousness, than having known it, to turn away from the holy commandment handed on to them.
2Pet. 2:22 It has happened to them according to the true proverb, “ A DOG RETURNS TO ITS OWN VOMIT,” and, “A sow, after washing, returns to wallowing in the mire.”
In the first example, the Bible teaches that believers can - and do - stray from the Lord. In their disobedience, their life can resemble the life of an unbeliever. These children of God may even deny the Lord, much as Peter denied Christ during His trial. These denials are, in fact, lies just as Peter's denials were lies. Though it may be hard to accept, a true believer may claim to be otherwise, may sin in egregious ways and make every effort to distance themselves from Christ in this life.
But as Paul wrote:
Rom. 8:38 For I am convinced that neither death, nor life, nor angels, nor principalities, nor things present, nor things to come, nor powers,
Rom. 8:39 nor height, nor depth, nor any other created thing, will be able to separate us from the love of God, which is in Christ Jesus our Lord.
In the second example, the Bible teaches that people can portray themselves as Christians in a convincing way, even to themselves. These portrayals include confessions of faith, the appearance of godly living, and even a degree of Biblical knowledge and piety. The Pharisees of Christ's day are the best example of this kind of counterfeit religious observance.
Nevertheless, such impostors were never truly born again as one of God's children. The missing ingredient was saving faith. The Bible says that saving faith is a gift of God, not something men acquire for themselves:
Eph. 2:8 For by grace you have been saved through faith; and that not of yourselves, it is the gift of God;
Eph. 2:9 not as a result of works, so that no one may boast.
This is the "gift of salvation" you mentioned. Saving faith itself is a gift, and once it comes to a person, they confess and believe are are saved forever. The gift comes with the power of the Holy Spirit, Who indwells the person permanently as a down payment on the eternal inheritance God has granted to the believer:
2Cor. 1:21 Now He who establishes us with you in Christ and anointed us is God,
2Cor. 1:22 who also sealed us and gave us the Spirit in our hearts as a pledge.
Eph. 4:30 Do not grieve the Holy Spirit of God, by whom you were sealed for the day of redemption.
Therefore, while we cannot say what happens to someone upon death, we can caution anyone from arriving at a doctrinal understanding through an analysis of any one person's life. Since unbelievers can act like believers and believers can act like unbelievers, we cannot rely on such observations to form conclusions about the truth of salvation.