Many of the uses of past and passed are straightforward, but sometimes choosing the correct word can be a little harder to work out! Let's get the easy ones out of the way first.
If what you're using is a noun or adjective referring to "a time before now," it's past:
Ducky didn't expect their investigation to have a connection to his past. (noun referring to times in Ducky's life before now)
Jonas may be the past president of the SG-1 fan club, but Mitchell has newly elected himself current president. (adjective modifying president, referring to a time before Mitchell)
If what you're using is a preposition or adverb that physically or metaphorically indicates "by" or "beyond," it's also past:
Gibbs signaled the team to go past the house, then double back. (preposition; the adverbial phrase past the house describes physically where the team will go)
Gibbs knew that as soon as a case came in the team would get past their bickering. (preposition; the adverbial phrase past their bickering describes metaphorically where the team will go)
Vala jumped back as a staff weapon blast went past. (adverb describing where the blast went)
If what you're using is the past tense or participle of the verb "to pass"—meaning to go by or move, or be successful (in a test or class), or in verbal phrases like "pass out"—it's passed:
Ziva passed the cars by veering into the lane of oncoming traffic. (past tense)
The cars were passed by Ziva like they were standing still. (participle, passive voice)
Teyla had passed all Sheppard's loyalty tests, but Bates was still suspicious of her. (participle, past perfect tense)
Those are the easy ones to distinguish; here are some tricky bits: Sometimes the verb participle passed can be an adjective also:
Gibbs slammed on the brakes when he realized where he'd seen the passed truck before. (adjective modifying truck)
Any adjective built from a common verbal phrase—pass by, pass out, pass up, pass on—will also always be passed:
Ronon hauled his passed-out teammate through the gate. (adjective modifying teammate)
Even when you are discussing time, your word might be passed when you are discussing the movement of minutes/hours/days, rather than the time before now or a time beyond:
Tony thought that on stakeout with Tim, time passed like molasses. (verb, the movement of time)
The past two hours, especially, were excruciating. (adjective, the time before now)
"It's past time for our relief to get here!" (preposition, beyond)
When discussing movement, there's also a subtle difference between location and action:
Teal'c's cup was full, so Daniel handed the thermos past him to Jack. (preposition, beyond)
Jack took the passed thermos and refilled his cup. (adjective modifying the noun thermos)
In the first sentence, the movement of the thermos is covered by the verb handed; past Teal'c is the location to which Daniel handed the thermos. In the second sentence, the thermos had been acted upon: Daniel passed the thermos to Jack. The thermos was passed to Jack by Daniel. Therefore, it was a passed thermos. A past thermos would be one that Jack had a few years ago and regretted losing on P3X-249.
There will be very few instances when you have the choice of either past or passed, and the difference is subtle:
Tony thought about his past opportunity to lead a team in Rota.This usage is more common, and refers to the fact that Tony was made an offer a few years ago. It doesn't imply anything except that an offer had been on the table in the past.
This usage is rarer. You would use it if you were trying to explicitly express that the opportunity was passed up or gone by. It can be less jarring to use another word like missed or to reword it more clearly, such as Tony thought about the opportunity he passed up to lead a team in Rota.
Tony thought about his passed opportunity to lead a team in Rota.
In sum, use passed when referring to an action or something that was acted upon. Use past when referring to a location in time (when) or space (beyond).