In that game, 41.Kf3 a move earlier looks like it would have stopped your opponent's h-pawn before it had a chance to get rolling. Your united passed pawn duo on the other hand is much easier to defend especially with your bishop's help.
Endgames tend to be less calculation-intensive than middlegames, but when it comes to a race to queen your pawns, it's important to calculate it all out. Keeping a record of your tree of variations might help. Paul Keres' Practical Chess Endings is a useful survey of some general principles, but if you want to improve your calculation skills, probably the best way is to practice, and analyze specific positions from your games.
Can anyone give me a few good options for endgame books? I feel like I am especially poor in the late stages where calculation is more important than general ideas (ie turn 40 of this game where I probably had winning chances http://www.chess.com/echess/game.html?id=30592155). How do I become more proficient in these situations?