Explicit solutions for a class of linear backward stochastic differential equations (BSDE) driven by Gaussian Volterra processes are given. These processes include the multifractional Brownian motion and the multifractional Ornstein-Uhlenbeck process. By an Itô formula, proven in the context of Malliavin calculus, the BSDE is associated to a linear second order partial differential equation with terminal condition whose solution is given by a Feynman-Kac type formula.