Hit the gym immediately after work before you get into lazy mode. That's what I did when I worked days. Working nights I would sleep and hit it when I woke up.
Having a home gym helps if you're not completely lacking in discipline. Get some Iron Master Dumbbells and his all in one bench. Takes up little room. If space is really limited use powerblocks and their simple bench. You can really get a lot done with little equipment. Everyone seems to think you have to do 4 exercises a body part. A barbell, adjustable dumbbells, squat rack, and a bench will give you all you need.
I always made it a priority to workout through insane schedules and family life.