Sentries are the key to an engineers success. He can only build one at a time (bind "build"), so pick a good spot for it. The spot should have a good view of the area, and also make it hard for enemies to spot it. Usually placed near the flag/key as the last line of defense, the Sentry can be placed near the front gates and still be effective. The Sentry has three levels, and once updated to "level 3" it can shoot rockets. tight, huh? yeah, well keep it repaired and resupplied regularly so it can wreck those fools on the other team.
Also use your EMP grenades ("+gren2") if you're ever forced to fight in close. Just as with the Medic, you want to be on the lookout for teammates who need to be "healed". Remember: your spanner (the engineer's version of the axe) can repair armor, which is undoubtedly a nice thing to do to your friends. It's especially helpful for defensive players, who might not have the time to resupply between enemy waves.
Finally, the Dispenser now automatically refills itself in new TF. These are a necessity for your team, cuz it allows them to stay near the front lines without having to go back to the resupply room. DO NOT: build a dispenser in a resupply room, build it somewhere heavily trafficed and useful.
AGAINST
Killing an Engineer really isn't that hard. His armor and health values are about as 'high' as a Spy's. In other words, one well placed rocket (or a few radius blasts) will knock 'em dead. What you really have to worry about are those Sentry guns! Unfortunately, well placed guns can be extremely hard to destroy, especially in numbers. If in distance, try a grenade or better yet, a MIRV. Else, try rockets. Napalm grenades work as well. If that doesn't seem to work, then get a bunch of Soldiers with nail grenades and hopefully that will work. If worst comes to worst, ask a Spy to help. Separate your team's attack pattern, if possible. A sentry gun can't fire at so many people. Also, be sure to assign someone to track down and kill those engineers, before they can repair the surely damaged guns. Sometimes it might help to be around the corner of the sentrygun. Just strafe around the corner, fire a rocket and strafe back.....do this untill the sentry gun is destroyed, the gun won't have time to fire at you since it needs about 2 seconds to aim you in.