Mulder and Scully's intimate dance at the end of "The Post-Modern Prometheus" represents an important development in their relationship on The X-Files. It's one of the first times we see them be so tender with each other, laying the groundwork for their eventual relationship. And according to Chris Carter, it came out of nowhere.
Speaking to Entertainment Weekly ahead of The X-Files' 11th season -- Gillian Anderson's final outing as Dana Scully -- Carter discussed filming the ending of the episode, which sees Mulder and Scully take a mutated man to a Cher concert. (Sidenote: It's actually an impersonator in the episode, but according to Carter, at one point Cher was interested in appearing but was ultimately unavailable.) As the mutant is brought on stage to dance, Mulder gets up from his seat and offers his hand to Scully, pulling her close for a slow dance as the final bars of "Walking in Memphis" play out.
It's a touching moment, but according to Carter, one that was improvised - while the director was trying to wrangle a crowd full of extras to co-operate (including, hilariously, a kid who wouldn't stop throwing gang signs), stars David Duchovny and Gillian Anderson stood up and started dancing together in front of the cameras:
When the scene got rolling we had a huge auditorium full of rowdy fans, and there were lots of distractions. One of them was a kid I had spotted in Los Angeles and then cast to play a character named Booger. He turned out to be great, but at that moment either he had had it with shooting or he just wanted to bust out -- he started throwing gang signs! I was focused on getting him to stop doing that so I could use the footage.
I had all these distractions and other things I was focused on, and at some point David and Gillian got up and started to dance. They just did it because they were enjoying themselves. Up until this point on the show, we had gone out of our way to keep Mulder and Scully professional and not to have them romantically involved. As much as we kind of flirted with those things, we had not seen them quite that lovey-dovey. It wasn't scripted; it was one of these moments that just came together on its own.
And there you have it - an iconic Mulder and Scully moment was born. Looks like Duchovny and Anderson knew the two were always destined to fall into each other's arms.