Paulo Sousa's team only required a draw to seal second place in Group B behind Real Madrid but dominated the first half either side of Fabian Frei's 25th-minute strike.
Ten years ago this week, Liverpool famously overturned the odds in their final group game to beat Olympiacos 3-1 and qualify en route to eventual 2005 Champions League glory in Istanbul.
But a disjointed performance meant similar heroics felt highly unlikely on Tuesday, even before substitute Lazar Markovic was sent off 15 minutes after being introduced.
Gerrard, who scored decisively a decade ago, made Anfield dream again with a brilliant 81st-minute free-kick.
Jordan Henderson's deflected header almost found the net four minutes from time, although five consecutive winless outings means Liverpool's European campaign will now continue at Europa League level.
Basel enjoyed the first clear opening of the match in the 13th minute when Luca Zuffi’s throughball caught out a disorganised Liverpool defence and met Shkelzen Gashi's intelligent run, although the forward steered his shot over.
Liverpool should have created a better chance when Henderson's lofted ball found Raheem Sterling in the Basel penalty area but the England international's cut-back to Gerrard was ill judged and under hit.
Indecisiveness was a feature of the hosts' play all over the pitch and there was a sense of inevitability when the Swiss side retained possession well for Zuffi to lay off and Frei to lash a powerful left-footed shot into the bottom corner.
Sterling gave Basel goalkeeper Tomas Vaclik his first work of the game with a routine save but it remained a far more testing night for the Liverpool defence - left-back Jose Enrique racing across to thwart Derlis Gonzalez after Zuffi was again given room to torment the hosts.
Captain Marco Streller volleyed wastefully wide at the back post in the 32nd minute and Zuffi was the creator once more as Gashi thumped a low shot home two minutes before an interval that Liverpool badly needed, only for the Basel man to be denied by the offside flag
Liverpool boss Brendan Rodgers introduced Alberto Moreno and Markovic for Enrique and Rickie Lambert at the interval - leaving the hosts without a recognised striker.
Looking to inject immediate impetus, Markovic charged down the Basel left and the visiting defence struggled to clear his cross before Gerrard sent a 25-yard shot wide.
Markovic and Joe Allen had 57th-minute efforts blocked, the Serbian winger at least providing a degree of impetus as Liverpool continued to struggle for fluency.
The better chances remained at the other end, though, the impressive Taulant Xhaka weaving past a pair of challenges to shoot agonisingly wide.
Liverpool's task shifted from difficult to improbable in the 60th minute when Markovic thrust a hand in Behrang Safari's direction.
The contact was minimal and the Basel defender's reaction highly theatrical, but referee Bjorn Kuipers produced his red card to Anfield's dismay.
The home faithful felt it should have been 10-a-side in the 71st minute but Vaclik raced out well to first get a hand to the ball when Sterling sent Gerrard racing clear of the visiting defence.
Almost inevitably, Liverpool's talisman and captain threatened a late twist when he clattered a shot home via the upright and, after his header, Henderson then tested Vaclik with a venomous drive in stoppage time.
Zuffi and Xhaka came close to settling Basel nerves on the break in a frantic finish while substitute Breel Embolo also threatened as Liverpool were left to reflect on falling some way short on their return to the top table of European football.