O, Tay-nnenbaum!

At midnight Thursday, Taylor Swift released a last-minute, unexpected holiday song to make the Yuletide slay. Titled “Christmas Tree Farm” — and reportedly written less than a week ago — it is accompanied by a music video that features home footage of a curly-haired young Swift basking in the glow of Xmas tree lights, sitting on Santa’s lap, playing in the snow and unwrapping a guitar. The uptempo, nearly four-minute song features footage back to 1989, the year she was born on Dec. 13.

The romantic, nostalgic single is an appropriate homage for Swift, who was raised on an actual Christmas tree farm in Pennsylvania.

“That’s why I’m sort of obsessed with Christmas,” Swift said in a 2013 interview with her then-music label, Big Machine, which was acquired last June (to Swift’s disgust) by music manager Scooter Braun.

After the song’s debut, Swift headed to Twitter to acknowledge her upbringing in a sugary wonderland fashion.

“I actually did grow up on a Christmas tree farm. In a gingerbread house, deep within the yummy gummy gumdrop forest. Where, funnily enough, this song is their national anthem,” she wrote in a post.

“I really love Christmas, I wish it was all year round, just like for the feeling that everybody has,” she also said in the 2013 interview. “Everybody’s buying gifts for each other and there’s sort of a feeling about it. But I think that the fact that I love it so much is probably because I grew up on a Christmas tree farm.”

Her new song additionally serves as a cheery love letter to an unseen soul mate who brings a sense of yearning to her heart. Swift sings of being “under the mistletoe, watching the fire glow” and declaring that “just being in your arms takes me back to that little farm where every wish comes true.”

Sure, the breezy tune may not be Eartha Kitt’s sultry “Santa Baby” or Judy Garland’s wistful “Have Yourself a Merry Little Christmas,” but it’s not Elmo & Patsy’s “Grandma Got Run Over By a Reindeer,” either.

Fans were quick to heap praise on the star and her new release. One tweeter noted the significance of opening an important gift, writing, “We just saw @taylorswift13 unwrap her first guitar … She didn’t know she would become a MUSIC LEGEND.”

Another poster said, “I don’t even celebrate christmas but Taylor Swift just got me into the Christmas spirit.”

Tay Tay first teased the holiday release Thursday morning on ABC’s “Good Morning America” and on her Twitter, Instagram and Facebook accounts in a selfie video that racked up more than 4 million views.

“Okay, I know this is pretty wild, but I’ve just written a Christmas song,” the sweater-clad singer says, feigning indecision about whether to release the song now or just wait until the 2020 holiday season. “I feel like it’s weird to just, like, wait a year to put it out. So, uh, I don’t know what to do.” She then seeks guidance from her trio of pet cats, all of whom seem indifferent.

“When they shun you with silence, ambivalence, and judgmental brush offs… just put the song out anyway,” the 29-year-old Swift writes in the accompanying caption.

She adorned the posts with the hashtag #ChristmasTreeFarm and, appropriately, a string of 13 decorated tree emojis. Swift’s father actually tended to the family farm as a “hobby,” she told Esquire in 2014. “It was such a weird place to grow up. But it has cemented in me this unnatural level of excitement about fall and then the holiday season. My friends are so sick of me talking about autumn coming. They’re like, ‘What are you, an elf?’ ”

This isn’t the “You Need to Calm Down” singer’s first foray into festive frolicking: In 2007 she released the six-song album “The Taylor Swift Holiday Collection.” It included covers of songs like twangy versions of “Santa Baby” and “Silent Night,” a fiddle- and mandolin-infused rendition of Irving Berlin’s “White Christmas,” and a perky version of “Last Christmas” by Wham! duo George Michael and Andrew Ridgeley.

On the album, she also co-wrote — with oft-collaborator Liz Rose — a bitter downer of a holiday breakup song titled “Christmases When You Were Mine.” (Sample lyric: “When you were putting up the lights this year, did you notice one less pair of hands?”)

This Christmas, unfortunately, Swift already has a lump of coal for her stocking. The 10-time Grammy winner’s latest album, “Lover,” was pretty much snubbed in this year’s nominations, landing only one nod in the top four categories. But this week she was gifted a cover shoot for People magazine’s 2019 People of the Year.

And Swift has another reason to celebrate this holiday season: She turns 30 next week, on Dec. 13 — the same day she’ll perform at the iHeartRadio and Z100 Jingle Ball 2019 at Madison Square Garden, where she’ll be joined by the Jonas Brothers, Camila Cabello, Lizzo, Halsey, Dan + Shay and more. After that she’ll claw her way into theaters in the “weird” film adaptation of Andrew Lloyd Webber’s “Cats.” (She also recorded the cat-atonic song “Beautiful Ghosts” for the movie’s soundtrack.) Plus, next year a documentary about the singer, titled “Taylor Swift: Miss Americana,” will be the opening night movie at the Sundance Film Festival, which runs from Jan. 23 to Feb. 2.