Kyrgios won all four of his singles matches and combined with Gavrilova for an unbeaten mixed doubles run.
But Gavrilova made a clutch cross-court volley before Kyrgios helped seal the 2-1 win in which the Australian team also faced a match point in the match tiebreaker.
Gavrilova trailed 6-1 in the second-set tiebreaker Saturday before reeling off seven straight points to secure victory.
"I played a tournament in under-12s, and it was a super tiebreaker, and I was down 9-1 and I ended up winning," Gavrilova said.
"I just literally told myself to settle down, just stop thinking of everything. Just think about how to win every point. I just played free."
Kyrgios took the first set in 26 minutes before securing an early break in the second set.
"It's an event that's been held for a long, long time — before I was even born," the 20-year-old Kyrgios said ahead of the final. "It's pretty special. Especially me and Dasha (Daria) — we grew up together in juniors."
After Australia's win Saturday, Kyrgios dedicated the title to his former coach Darren Tandy, who died last month of colon cancer.
"He was a good mate of mine actually," Kyrgios said of Tandy, who was coaching Britain's James Ward before he died.
"I spent a lot of time with him on tour. It's definitely a sad time. I want to honor this win to him."